forked from dnayloa/novy-sobor-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
34 lines (21 loc) · 657 Bytes
/
main.py
File metadata and controls
34 lines (21 loc) · 657 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
import discord
import os
from discord.ext import commands
from osrsquery import OSRSQuery
from decouple import config
bot = commands.Bot(command_prefix="!")
# bot = discord.Client()
osrs = OSRSQuery()
@bot.event
async def on_ready():
print('We have logged in as {0.user}'.format(bot))
@bot.command()
async def on_message(message):
if message.author == bot.user:
return
@bot.command(name='ge')
async def _ge(ctx, arg):
await ctx.send(embed=osrs.item_value(arg))
# if message.content.startswith('/ge_trend'):
# await message.channel.send(osrs_query.grand_enchange_price(message.content))
bot.run(config('TOKEN'))