Added Discord Presence Changes + Message History saving

This commit is contained in:
BuildTools 2021-01-12 20:29:02 +01:00
parent f4ec5cd4c8
commit b733f05293

3
run.py
View file

@ -31,6 +31,7 @@ def printversion():
async def download():
await bot.change_presence(activity=discord.Game(name=" downloading Message History"))
for trainchannel in config["trainchannels"]:
channel = await bot.fetch_channel(trainchannel[0])
counter = 0
@ -39,6 +40,8 @@ async def download():
messages[counter] = message.content
counter += 1
messages.reverse()
with open(str(trainchannel[0]) + ".yml", "w") as logfile:
yaml.dump(messages, logfile)
@bot.event