mirror of
https://gitlab.jonasled.de/jonasled/discordbot
synced 2024-11-20 10:13:03 +01:00
documentation on poll result link
This commit is contained in:
parent
517a664801
commit
960e6740d6
1 changed files with 2 additions and 2 deletions
4
bot.py
4
bot.py
|
@ -285,8 +285,8 @@ async def result(ctx, id):#this function prints the result of a poll
|
|||
embed = discord.Embed(title=poll_message.embeds[0].title, description=description)#prepare the result
|
||||
embed.set_footer(text='enden on ' + datetime.now().strftime("%d.%m.%Y %H:%M:%S"))#set as footer the end time of the poll
|
||||
await poll_message.edit(embed=embed)#edit the origina lmessage and print the results
|
||||
embed2 = discord.Embed(title=" ", description="You can find the result of the poll in the original message [here](" + poll_message.jump_url + ").")
|
||||
await ctx.message.channel.send(embed=embed2)#send a message with a link to the original poll in the chat
|
||||
embed2 = discord.Embed(title=" ", description="You can find the result of the poll in the original message [here](" + poll_message.jump_url + ").")#This message will be printed to the end of the chat with a link to the original (where the results are)
|
||||
await ctx.message.channel.send(embed=embed2)#print the result message from one line up
|
||||
c.execute("DELETE FROM poll where pollID = ?", [id])#delete the entries from the poll in the database
|
||||
conn.commit()#write the database to disk
|
||||
|
||||
|
|
Loading…
Reference in a new issue