ayushsehrawat / eco-bot Goto Github PK
View Code? Open in Web Editor NEWA Economy Bot made using discord module of python
Home Page: https://discord.gg/gQ9rcuNK75
License: MIT License
A Economy Bot made using discord module of python
Home Page: https://discord.gg/gQ9rcuNK75
License: MIT License
Well, it worked for me ( i didn't try now ). Try seeing json file ? How it is saving
Originally posted by @AyushSehrawat in #21 (comment)
Maybe a issue with my bot but I want to know why it happens . My one or two comma ds don't work ever
Can we add the new Ui buttons in any commands??
So i keep getting the error:
Traceback (most recent call last):
File "c:\Users\blake\Main-Discord-Bot\main.py", line 41, in <module>
client.load_extension(cog_file) # Load the file
File "C:\Users\blake\AppData\Roaming\Python\Python310\site-packages\discord\cog.py", line 787, in load_extension
self._load_from_module_spec(spec, name)
File "C:\Users\blake\AppData\Roaming\Python\Python310\site-packages\discord\cog.py", line 732, in _load_from_module_spec
raise errors.ExtensionFailed(key, e) from e
discord.errors.ExtensionFailed: Extension 'games.economy.economy' raised an error: AttributeError: 'Bot' object has no attribute 'remove_command'PS
(I have taken the cog out and converted to slash commands, however that shouldn't be causing this at all, as I have many other functions doing it)
Command raised an exception: ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused, Timeout: 30s, Topology Description: <TopologyDescription id: 61c6d56334064291055deb53, topology_type: Single, servers: [<ServerDescription ('localhost', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('localhost:27017: [Errno 111] Connection refused')>]>
Well this is a error I am getting when I tried to make a warn cog with mongodb(inspiration from leafy-bot) please help
Bal doesnt work
Sell this doesnt gives the cost of items back
as said in the read me file, i just copy pasted my token in the 'token' area. but i got this set of errors when i tried to run the module:(
please help, i just want an economy bot for my server
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/discord/ext/commands/bot.py", line 606, in _load_from_module_spec
spec.loader.exec_module(lib)
File "", line 855, in exec_module
File "", line 228, in _call_with_frames_removed
File "/Users/lucky/Downloads/Economy-Bot-main/Economy_bot_code/cogs/info.py", line 3, in
import psutil
ModuleNotFoundError: No module named 'psutil'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/lucky/Downloads/Economy-Bot-main/Economy_bot_code/main.py", line 434, in
client.load_extension(f'cogs.{filename[:-3]}')
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/discord/ext/commands/bot.py", line 678, in load_extension
self._load_from_module_spec(spec, name)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/discord/ext/commands/bot.py", line 609, in _load_from_module_spec
raise errors.ExtensionFailed(key, e) from e
discord.ext.commands.errors.ExtensionFailed: Extension 'cogs.info' raised an error: ModuleNotFoundError: No module named 'psutil'
My help screen printed looks like this I want to change the No Category and also get rid of the Show this message where can I do that because I cant find the help commands in the code anywhere?
No Category:
balance
beg
buy
deposit
help Shows this message
inv
leaderboard
rob
sell
send
shop
slots
withdraw
Type !help command for more info on a command.
You can also type !help category for more info on a category.
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: NameError: name 'open_account' is not defined
There is occurring Please help me to solve it!
asking for 'run = "echo hello word" to be added to the file
Hi! I hope for your help. So the code you shared works really well and I'm thankful you shared it, but I have a problem with the leaderboard command. Whenever I use it, I get this error: discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'name'. It's in the line 385, where name = member.name . Do you know any solutions to this?
even when i downloaded ptusil module(thanks for that btw) i still get a BUNCH of errors. Please help ;0
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aiohttp/connector.py", line 969, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 1081, in create_connection
transport, protocol = await self._create_connection_transport(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 1111, in _create_connection_transport
await waiter
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/sslproto.py", line 528, in data_received
ssldata, appdata = self._sslpipe.feed_ssldata(data)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/sslproto.py", line 188, in feed_ssldata
self._sslobj.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 944, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/lucky/Downloads/Economy-Bot-main 2/Economy_bot_code/main.py", line 437, in
client.run('ODQ5ODQ4OTcyMjIxODc0MjQ2.YLhJiA.VvYFtWb4CYCE1gCo1HHqzmY6KrM')
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/discord/client.py", line 723, in run
return future.result()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/discord/client.py", line 702, in runner
await self.start(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/discord/client.py", line 665, in start
await self.login(*args, bot=bot)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/discord/client.py", line 511, in login
await self.http.static_login(token.strip(), bot=bot)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/discord/http.py", line 300, in static_login
data = await self.request(Route('GET', '/users/@me'))
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/discord/http.py", line 192, in request
async with self.__session.request(method, url, **kwargs) as r:
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aiohttp/client.py", line 1117, in aenter
self._resp = await self._coro
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aiohttp/client.py", line 520, in _request
conn = await self._connector.connect(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aiohttp/connector.py", line 535, in connect
proto = await self._create_connection(req, traces, timeout)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aiohttp/connector.py", line 892, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aiohttp/connector.py", line 1051, in _create_direct_connection
raise last_exc
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aiohttp/connector.py", line 1020, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aiohttp/connector.py", line 971, in _wrap_create_connection
raise ClientConnectorCertificateError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host discord.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)')]
Can you add Cooldown for this bot? Thanks in Advance
Leaderboard command not working . No error No response . Here is the code - (Same as yours)
@client.command(aliases = ["lb"])
async def leaderboard(ctx,x = 1):
users = await get_bank_data()
leader_board = {}
total = []
for user in users:
name = int(user)
total_amount = users[user]["wallet"] + users[user]["bank"]
leader_board[total_amount] = name
total.append(total_amount)
total = sorted(total,reverse=True)
em = discord.Embed(title = f"Top {x} Richest People" , description = "This is decided on the basis of raw money in the bank and wallet",color = discord.Color(0xfa43ee))
index = 1
for amt in total:
id_ = leader_board[amt]
member = client.get_user(id_)
name = member.name
em.add_field(name = f"{index}. {name}" , value = f"{amt}", inline = False)
if index == x:
break
else:
index += 1
await ctx.send(embed = em)
There is no indentation errors too
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.