aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2020-12-16 15:57:07 +0530
committerVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2020-12-16 15:57:07 +0530
commit904c2b0209b36fd527175a6f00aa10ce21d54988 (patch)
treef8cd6b87e4c6c1556da664bfbfb55b3136ee91d7
parent55b3b5f68e6efe9ae4a8653244c7442d291ba47b (diff)
now the help message is a different file and can be changed on the fly
-rw-r--r--bot.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/bot.py b/bot.py
index 2c43283..b234774 100644
--- a/bot.py
+++ b/bot.py
@@ -12,9 +12,15 @@ def get_info():
bad_words = ['fuck', 'shit', 'bitch', 'cunt', 'sex']#, '', '', '', '', '', '', '', '', '', '', '', '')
+# z!help
+def show_help():
+ help = open('help_message.txt', 'r')
+ help_message = help.read()
+ return help_message
CALL = "z!"
+
HELP_MESSAGE = '```Every command should be prefixed with "' + CALL + '".\n\nsay repeats your previous message\ninfo displays info about the bot and the creator\nhelp shows this message```'
@@ -34,7 +40,6 @@ HELP_MESSAGE = '```Every command should be prefixed with "' + CALL + '".\n\nsay
load_dotenv()
TOKEN = os.getenv('DISCORD_TOKEN')
-PASSWORD = os.getenv('ADMIN_PASSWORD') # this can prove to be insecure af
# frontend stuff
client = discord.Client()
@@ -75,7 +80,7 @@ async def on_message(message):
# send help message
if message.content == CALL + 'help':
- response = HELP_MESSAGE
+ response = show_help()
await message.channel.send(response)
# cultured stuff