Skip to content

Instantly share code, notes, and snippets.

@4Kaylum
Last active May 19, 2018 00:08
Show Gist options
  • Select an option

  • Save 4Kaylum/56ca463ff603a0bc8d3d9601e3391309 to your computer and use it in GitHub Desktop.

Select an option

Save 4Kaylum/56ca463ff603a0bc8d3d9601e3391309 to your computer and use it in GitHub Desktop.
import discord
import asyncio
import sys
from discord.ext import commands
bot = commands.Bot(command_prefix=']',self_bot=True)
non_bmp_map = dict.fromkeys(range(0x10000, sys.maxunicode + 1), 0xfffd)
@bot.event
async def on_ready():
print("----------")
print("Logged in as:")
print(" "+str(bot.user.name))
print(" "+str(bot.user.id))
print("----------")
@bot.event
async def on_message(message):
if message.author.id == bot.user.id:
# print('{0.timestamp} :: {0.content}'.format(message).translate(non_bmp_map))
if message.content.replace(' ','') == '%✈📺📻':
print('{0.timestamp} :: Command has been triggered'.format(message))
token = "Redacted"
bot.run(token, bot=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment