Skip to content
Snippets Groups Projects
Commit 00ec66b0 authored by amy's avatar amy
Browse files

First commit

parent 943bf1a7
Branches
No related tags found
No related merge requests found
token
bot.py 0 → 100644
import discord, asyncio
import os, sys
def getPath():
return os.path.dirname(os.path.realpath(__file__))
prefix = "!"
client = discord.Client()
@client.event
async def on_ready():
print(client.user.name + " booted up.")
await client.change_presence(activity = discord.Game(name = prefix + "help"))
@client.event
async def on_member_join(member):
print(member)
tokenFile = getPath() + "/token"
if (not os.path.isfile(tokenFile)):
print("Please create a 'token' file with the discord bot token in it.")
sys.exit(1)
token = open(tokenFile, "r").read().strip()
client.run(token + " Joined.")
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment