Skip to content

Commit 0ae752c

Browse files
authored
run
removed the shit that doesn't do anything
1 parent 7cc6d99 commit 0ae752c

1 file changed

Lines changed: 1 addition & 70 deletions

File tree

run.py

Lines changed: 1 addition & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import json
2-
import os
31
import discord
42
from discord.ext import commands
53

@@ -12,7 +10,7 @@
1210

1311

1412
##########################
15-
token = 'Ur_Bot_Token_Here'
13+
token = 'BOT_TOKEN'
1614
##########################
1715

1816

@@ -140,73 +138,6 @@ async def userinfo(ctx, *, user: discord.Member = None):
140138

141139

142140

143-
144-
########################################### FCOIN #############################################
145-
146-
147-
148-
149-
if os.path.exists('amounts.json'):
150-
with open('amounts.json', 'r') as file:
151-
amounts = json.load(file)
152-
else:
153-
amounts = {} # default to not loading if file not found
154-
155-
156-
157-
158-
159-
@bot.event
160-
async def on_ready():
161-
global amounts
162-
try:
163-
with open('amounts.json') as f:
164-
amounts = json.load(f)
165-
except FileNotFoundError:
166-
print("Could not load amounts.json")
167-
amounts = {}
168-
169-
@bot.command(pass_context=True)
170-
async def balance(ctx):
171-
id = str(ctx.message.author.id)
172-
if id in amounts:
173-
await ctx.send("You have {} in the bank".format(amounts[id]))
174-
else:
175-
await ctx.send("You do not have an account")
176-
177-
@bot.command(pass_context=True)
178-
async def register(ctx):
179-
id = str(ctx.message.author.id)
180-
if id not in amounts:
181-
amounts[id] = 100
182-
await ctx.send("You are now registered")
183-
_save()
184-
else:
185-
await ctx.send("You already have an account")
186-
187-
@bot.command(pass_context=True)
188-
async def transfer(ctx, amount: int, other: discord.Member):
189-
primary_id = str(ctx.message.author.id)
190-
other_id = str(other.id)
191-
if primary_id not in amounts:
192-
await ctx.send("You do not have an account")
193-
elif other_id not in amounts:
194-
await ctx.send("The other party does not have an account")
195-
elif amounts[primary_id] < amount:
196-
await ctx.send("You cannot afford this transaction")
197-
else:
198-
amounts[primary_id] -= amount
199-
amounts[other_id] += amount
200-
await ctx.send("Transaction complete")
201-
_save()
202-
203-
def _save():
204-
with open('amounts.json', 'w+') as f:
205-
json.dump(amounts, f)
206-
207-
208-
209-
210141
############################################ ALIASES ###########################################
211142

212143
@bot.command(name='aliases', aliases=['al'])

0 commit comments

Comments
 (0)