aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar JoeBanks13 <[email protected]>2018-02-03 12:39:28 +0000
committerGravatar JoeBanks13 <[email protected]>2018-02-03 12:39:28 +0000
commitfcc7aea468ade790fc62440fe5ab4a93eea75b8a (patch)
tree472f8eeb66c257d9029d9bf8e813d2de57c6cf73
parentCreate requirements.txt & add discord.py (diff)
Add basic bot
-rw-r--r--__main__.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/__main__.py b/__main__.py
new file mode 100644
index 000000000..cb4157707
--- /dev/null
+++ b/__main__.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python3
+
+import discord
+from discord.ext import commands
+import os
+
+bot = commands.Bot(command_prefix=commands.when_mentioned_or(
+ os.environ.get("BOT_PREFIX")))
+
+
+async def ping(ctx):
+ await ctx.send("Pong.")
+
+bot.run(os.environ.get("BOT_TOKEN"))