forked from KawaiiLizzy/KantoBOT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
KantoBot.py
73 lines (59 loc) · 2.75 KB
/
KantoBot.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
71
72
73
import discord
from discord.ext import commands
from .utils.dataIO import fileIO
from random import randint
from copy import deepcopy
from .utils import checks
from __main__ import send_cmd_help
from operator import settings as bot_settings
import os
import time
#import logging
"""-----------------------------------------------------------------------------------------------------------------------------------
||Store Data||
-----------------------------------------------------------------------------------------------------------------------------------"""
ECON_DIR = "data/economy/bank.json"
#SPRITES = http://randompokemon.com/ (NEED TO CONTACT)
"""-----------------------------------------------------------------------------------------------------------------------------------
|| Start Creating Commands for the Bot ||
-----------------------------------------------------------------------------------------------------------------------------------"""
class Kanto:
"""
Lets you catch random pokemon utilizing the economy cog.
Goal is to complete the PokeDex
You can purchase Pokeballs
"""
def __int__(self,bot):
self.bot = bot
self.bal = fileIO(ECON_DIR, "load")
#self.pc = fileIO("data/KantoBot/pc/users.json", "load") USE FOR FUTURE GOAL.
@commands.group(name="pokemon", pass_context=True, no_pm=False)
async def _pokemon(self, ctx):
""" Shows all pokemon commands """
if ctx.invoked_subcommand is None:
await send_cmd_help(ctx)
@_pokemon.command(pass_contex=True):
async def register():
""" Registers the user to become a pokemon trainer """
"""-----------------------------------------------------------------------------------------------------------------------------------
|| End of Commands ||
|| Start of Background Check ||
-----------------------------------------------------------------------------------------------------------------------------------"""
def check_folders():
""" Check to see if all the directories are present
Add folders here if needed for a new directory """
folders = ("data/KantoBot/", "data/KantoBot/pc/")
for folder in folders:
if not os.path.exsist(folder):
print("Building the directory " + folder + " ...")
os.makedir(folder)
def check_files():
""" Check to see if all the needed files are downloaded
Add files here if needed for new file """
file = "data/KantoBot/pc/users.json"
if not fileIO(file, "check"):
print("Adding in empty users.json ...")
fileIO(file, "save", [])
def setup(bot):
game = Kanto(bot)
bot.add_cog(game)