-
Notifications
You must be signed in to change notification settings - Fork 46
Leaderboard command not working . No error No response #21
Comments
Well, it worked for me ( i didn't try now ). Try seeing json file ? How it is saving |
I don't know why it doesn't works for me , few commands do t ever work though there are no errors . Sorry for wasting your time |
I recommend you use mongodb ( or sql/postgresql ) for making a economy bot. You can use this as a reference and dbs are easier than json. |
debug them ? |
This is the error coming |
The main problem is with member.id thing |
Check json file? Btw i suggest you create bot from scratch and use these as a idea of how to make :) |
it works now but the names come double of some people |
@AyushSehrawat btw how do I add a command of showing detailed information about the item |
Also can you help me make the following command better I want the bot to automatically take money back after a user takes loan for a period owner = 900992402356043806
@client.command()
@commands.cooldown(1, 60*60*24*7, commands.BucketType.user)
async def loan(ctx, amount : int):
loan_available = int(client.open_account(owner)['wallet'])
if int(amount) <= loan_available:
time.sleep(1)
await ctx.channel.send('You have been given ' + ''.join(str(amount) + ". You will have to pay " + str((int(amount)+int(amount)*0.1)) +" baguttes within 2 weeks."))
await update_bank(ctx.author,+1*amount,'bank')
must_pay.update({ctx.author.name:str(amount)})
else:
time.sleep(2)
await ctx.channel.send("You Can only request a loan within "+str(loan_available))
# New asyncio code
await asyncio.sleep(60*60*24*7) # Wait for 60*60*24*7 seconds
# Here, just add the code to take the money away after 60*60*24*7 seconds this is my code I just want to know how to make the must.pay_within I dont know how to define it |
It won't work.
|
For detailed info abt item, add another key in dictionary ? |
No I want like if a person enters shop ferrari it should show a embed about it like dankmemer i Dont want to make too mny subcommands for it if there is a easier way |
Btw cant this be performed in json also lke save the money taken, time etc |
I will figure out |
Json gets corrupt if many read/write. You can use them for loading data, but constantly writing data will corrupt. Its free and easy to get a mongodb , you can try that. |
@prakarsh17 You can check new readme for how to get mongodb instead of json :) |
Yeah I saw it yesterday only and wanted to thank you , I have implemented mongodb as a beta/testing feature in my bot , I will use it in the future hopefully , btw I can also copy your code from leafy-bot and understand it and use it , leafy-bot is amazing . Btw you said you had left db so now how? |
leafy-bot is open source, so yea you can see but try to implement code your own way :) It will help you.. Also, wdym by |
Q - A -
|
Oh, this repo was getting pretty much attention ( i mean views, stars and forks ) so edited it. Previous code was my first bot code ;). This one is better. Btw checkout my latest updates for buy and sell command :) |
Leaderbord and extra commands soon :) |
Checking I think I should make a new bot i cant have two sys in one bot what u say , the json one is very big and grown so it is not worth replacing it |
one more thing , i need two more clusters isnt it so where to make it inside the first one or in the project where? I am new to it |
You can create another inside it. When you login in Mongodb and see your project clusters. There you can see Database Deployments. There create new. Or you can just create new project |
oh so you are online , are u on discord btw |
Creating new is better. Replace it when done |
ok pls tell your discord username |
Mini#5183 |
@prakarsh17 https://discord.gg/gQ9rcuNK75 : For discord server |
Leaderboard command not working . No error No response . Here is the code - (Same as yours)
There is no indentation errors too
The text was updated successfully, but these errors were encountered: