Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @client.event
- async def on_message(message):
- if isinstance(message.channel, discord.DMChannel):
- if message.author.id != client.user.id:
- await message.author.send(':x: Sorry, but I dont accept commands through direct messages! Please use the #bot-commands" channel of your corresponding server! :x:')
- elif isinstance(message.channel, discord.TextChannel):
- if message.channel.id == 634468664263049257:
- if message == '$create-invite':
- embed = discord.Embed(title=':white_check_mark: Invite added', type='rich', color=0x2ecc71) #Green
- embed.set_thumbnail(url=guild.icon_url)
- embed.add_field(name='Server', value=guild.name, inline=True)
- embed.add_field(name='Channel', value=guild.channel.name, inline=True)
- await message.channel.send(embed=embed)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement