Quantcast
Channel: How do I make a "Sticky message" that stays always on the bottom of the channel. (Discord.py) - Stack Overflow
Viewing all articles
Browse latest Browse all 2

How do I make a "Sticky message" that stays always on the bottom of the channel. (Discord.py)

$
0
0

While working on my Discord bot, I found another bot that does "sticky messages". That basically means that an embed or message will always stay at the bottom and the second message will be deleted.

Example

https://i.stack.imgur.com/2Hr3e.gif

Code:

@bot.eventasync def on_message(message):    if message.channel.id == 1206246422324715580:        if message.author == bot.user:            return        else:            msg = await message.channel.fetch_message(1208866913426473021)            new_embed = msg.embeds[0].copy()            await message.channel.send(embed=new_embed)            # await new_embed.delete()    else:        return

But it didn't delete the old message. I'm thinking of having something with a database and JSON. I want to make it look like the GIF I sent before.


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>