-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChip_Adder_1.0.py
30 lines (23 loc) · 887 Bytes
/
Chip_Adder_1.0.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
import discord
from discord.ext import commands
import csv
client = commands.Bot(command_prefix='!')
@client.event
async def on_ready():
print('Bot is ready!')
#Change file path to where csv is downloaded to and rename the file to chosen name
@client.command()
async def Add_Chips(ctx, x):
file = open(r"C:\Users\user\Downloads\chips_rank.csv", "r", encoding='ANSI')
csv_reader = csv.reader(file)
for line in csv_reader:
await ctx.send('!pac {} {}'.format(line[2],x))
#Change file path to where csv is downloaded to and rename the file to chosen name
@client.command()
async def Remove_Chips(ctx, x):
file = open(r"C:\Users\user\Downloads\chips_rank.csv", "r", encoding='ANSI')
csv_reader = csv.reader(file)
for line in csv_reader:
await ctx.send('!prc {} {}'.format(line[2],x))
#Add your bot token
client.run('ADD_YOUR_BOT_TOKEN_HERE')