Skip to content

Instantly share code, notes, and snippets.

@EZLiang
Created April 6, 2020 00:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EZLiang/0c540748ba298b83a6ac1681c800b5c7 to your computer and use it in GitHub Desktop.
Save EZLiang/0c540748ba298b83a6ac1681c800b5c7 to your computer and use it in GitHub Desktop.
import discord
client = discord.Client()
@client.event
async def on_message(msg):
if msg.author == client.user:
return
elif client.user in msg.mentions:
await msg.channel.send("_I have been pinged by {}!_".format(msg.author.mention))
def main():
client.run(sys.argv[1])
if __name__ == "__main__":
main()
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment