-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbot.py
More file actions
41 lines (27 loc) · 1004 Bytes
/
Copy pathbot.py
File metadata and controls
41 lines (27 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import os
import discord
from warframe import warframe
#variables
TOKEN = os.getenv('DISCORD_TOKEN')
client = discord.Client()
warframeObj = warframe.Warframe()
@client.event
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
@client.event
async def on_message(message):
# we do not want the bot to reply to itself
if message.author == client.user:
return
#bot will post the commands and descriptions
if message.content.startswith('!help'):
msg = '{0.author.mention} These are the commands:\n'
msg += '!warframe !help : Gets all Warframe commands.\n'
newmsg = msg.format(message)
await message.channel.send(newmsg)
elif message.content.startswith('!warframe'):
await message.channel.send(warframeObj.handleMessageWrapper(message.content,'{0.author.mention}'.format(message)))
client.run(TOKEN)