<gh_stars>0
from os import getcwd as getDir
from os.path import isfile as existFile
from discord import Client


# Welcome to the hardcode area :)
token = "token" # todo: move this into a config or env variables
prefix = "!" # todo: move this into a config or env variables
# Welcome to the hardcode area :)
client = Client()


@client.event
async def on_ready():
    print(f'Successfully logged into {client.user}!')


@client.event
async def on_message(message):
    if message.author == client.user:
        return
    if not message.content.startswith(prefix):
        return
    args = message.content.split()
    command = args[0][len(prefix):len(args[0])]
    args.pop(0)
    if (existFile(getDir()+"/commands/" + command + ".py")):
        import commands.handler as CommandHandler
        CommandHandler.run(command, args)

client.run(token)

from os import getcwd as getDir
from os.path import isfile as existFile
from discord import Client


# Welcome to the hardcode area :)
token = "token" # todo: move this into a config or env variables
prefix = "!" # todo: move this into a config or env variables
# Welcome to the hardcode area :)
client = Client()


@client.event
async def on_ready():
    print(f'Successfully logged into {client.user}!')


@client.event
async def on_message(message):
    if message.author == client.user:
        return
    if not message.content.startswith(prefix):
        return
    args = message.content.split()
    command = args[0][len(prefix):len(args[0])]
    args.pop(0)
    if (existFile(getDir()+"/commands/" + command + ".py")):
        import commands.handler as CommandHandler
        CommandHandler.run(command, args)

client.run(token)
# Welcome to the hardcode area :) # todo: move this into a config or env variables # todo: move this into a config or env variables # Welcome to the hardcode area :)