Declare xp
This commit is contained in:
parent
38121d2219
commit
8325118a2d
1 changed files with 2 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ class MessageXP(BotBaseCog):
|
||||||
@commands.command()
|
@commands.command()
|
||||||
async def stats(self, ctx):
|
async def stats(self, ctx):
|
||||||
author_id = ctx.author.id
|
author_id = ctx.author.id
|
||||||
|
xp_data = {}
|
||||||
if not os.path.exists(os.path.join(self.data_dir, "xp.json")):
|
if not os.path.exists(os.path.join(self.data_dir, "xp.json")):
|
||||||
create_xp_file(self)
|
create_xp_file(self)
|
||||||
try:
|
try:
|
||||||
|
|
@ -39,6 +40,7 @@ class MessageXP(BotBaseCog):
|
||||||
if message.author.bot:
|
if message.author.bot:
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
|
xp_data = {}
|
||||||
#check if file exists
|
#check if file exists
|
||||||
if not os.path.exists(os.path.join(self.data_dir, "xp.json")):
|
if not os.path.exists(os.path.join(self.data_dir, "xp.json")):
|
||||||
create_xp_file(self)
|
create_xp_file(self)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue