-
Notifications
You must be signed in to change notification settings - Fork 0
/
bot.py
70 lines (56 loc) · 1.7 KB
/
bot.py
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# bot.py
import FreeRot
import CurrentMatch
import PlayerData
import LastTenMatches
import PlayerMatchHistory
import PastMatchData
import CommandList
import AboutMe
import discord
from discord.ext import commands
client = commands.Bot(command_prefix = '!')
@client.event
async def on_ready():
print('Bot is ready.')
@client.event
async def on_member_join(member):
print(f'{member} has joined a server.')
@client.event
async def on_member_remove(member):
print(f'{member} has left a server.')
@client.command()
async def freeRot(ctx):
champs = FreeRot.getFreeRot()
await ctx.send(embed=champs)
@client.command()
async def currentMatch(ctx, arg):
participants = CurrentMatch.getPlayerList(arg)
await ctx.send(embed=participants)
@client.command()
async def data(ctx, arg):
embedVar = PlayerData.getPlayerData(arg)
await ctx.send(embed=embedVar)
@client.command()
async def teamMatchHistory(ctx, arg):
matchHistories = LastTenMatches.getPlayerList(arg)
for participant in matchHistories:
await ctx.send(participant)
@client.command()
async def playerMatchHistory(ctx, arg):
matchHistory = PlayerMatchHistory.getPlayerList(arg)
await ctx.send(embed=matchHistory)
@client.command()
async def playerMatchData(ctx, arg1, arg2):
matchData = PastMatchData.getSpecificMatch(arg1, arg2)
for match in matchData:
await ctx.send(match)
@client.command()
async def commands(ctx):
embedVar = CommandList.getCommandList()
await ctx.send(embed=embedVar)
@client.command()
async def about(ctx):
embedVar = AboutMe.getAboutEmbed()
await ctx.send(embed=embedVar)
client.run('')