From edf8383301b0b2408cfbabe35b477692c58eabab Mon Sep 17 00:00:00 2001 From: Someone Date: Mon, 10 Jan 2022 19:27:34 +0100 Subject: [PATCH] modules/WSGuestControl.py --- modules/WSGuestControl.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/WSGuestControl.py b/modules/WSGuestControl.py index 38ccff9..cc99c67 100644 --- a/modules/WSGuestControl.py +++ b/modules/WSGuestControl.py @@ -8,7 +8,8 @@ import re from inspect import cleandoc -from AbstractWSHandler import * +# pylint: disable=wrong-import-position +from AbstractWSHandler import AbstractWSHandler class WSGuestControl(AbstractWSHandler): NAME = "guestcontrol" @@ -28,8 +29,8 @@ class WSGuestControl(AbstractWSHandler): print("WSGuestControl: Promoting guest.") self.bot.api.promote_a_guest(user["id"]) - c = self.bot.api.create_dm_channel_with(user["id"]) - self.bot.api.create_post(c["id"], cleandoc(""" + chan = self.bot.api.create_dm_channel_with(user["id"]) + self.bot.api.create_post(chan["id"], cleandoc(""" ### ``Your account has been converted to a FULL-USER account!`` You are now able to use all the features mattermost and this instance has to offer! # :thumbsup: @@ -50,8 +51,8 @@ class WSGuestControl(AbstractWSHandler): self.bot.api.add_user_to_team(team_id, user["id"], exc=False) self.bot.api.add_user_to_channel(chan_id, user["id"], exc=False) - c = self.bot.api.create_dm_channel_with(user["id"]) - self.bot.api.create_post(c["id"], cleandoc(""" + chan = self.bot.api.create_dm_channel_with(user["id"]) + self.bot.api.create_post(chan["id"], cleandoc(""" ## ``Confirm your student email to get full access to Mattermost`` Your account is currently a [guest account](https://docs.mattermost.com/deployment/guest-accounts.html), which means your user expirience is limited due to privacy, copyright and licencing reasons and you are restricted to these channels: * Beratung (Consultation) -- 2.43.0