Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. @client.event
  2. async def on_message(message):
  3. if isinstance(message.channel, discord.DMChannel):
  4. if message.author.id != client.user.id:
  5. 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:')
  6. elif isinstance(message.channel, discord.TextChannel):
  7. if message.channel.id == 634468664263049257:
  8. if message == '$create-invite':
  9. embed = discord.Embed(title=':white_check_mark: Invite added', type='rich', color=0x2ecc71) #Green
  10. embed.set_thumbnail(url=guild.icon_url)
  11. embed.add_field(name='Server', value=guild.name, inline=True)
  12. embed.add_field(name='Channel', value=guild.channel.name, inline=True)
  13.  
  14. await message.channel.send(embed=embed)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement