Added Discord Presence Changes + Message History saving
This commit is contained in:
parent
f4ec5cd4c8
commit
b733f05293
3
run.py
3
run.py
|
@ -31,6 +31,7 @@ def printversion():
|
||||||
|
|
||||||
|
|
||||||
async def download():
|
async def download():
|
||||||
|
await bot.change_presence(activity=discord.Game(name=" downloading Message History"))
|
||||||
for trainchannel in config["trainchannels"]:
|
for trainchannel in config["trainchannels"]:
|
||||||
channel = await bot.fetch_channel(trainchannel[0])
|
channel = await bot.fetch_channel(trainchannel[0])
|
||||||
counter = 0
|
counter = 0
|
||||||
|
@ -39,6 +40,8 @@ async def download():
|
||||||
messages[counter] = message.content
|
messages[counter] = message.content
|
||||||
counter += 1
|
counter += 1
|
||||||
messages.reverse()
|
messages.reverse()
|
||||||
|
with open(str(trainchannel[0]) + ".yml", "w") as logfile:
|
||||||
|
yaml.dump(messages, logfile)
|
||||||
|
|
||||||
|
|
||||||
@bot.event
|
@bot.event
|
||||||
|
|
Loading…
Reference in a new issue