#Global Bot and json

1 messages · Page 1 of 1 (latest)

timid moss
#

Hi there!
Can you just give the part of your code that is causing problems and add some details about your problem?

#

I have many errors, is your code complete?

#

send me your import list

#

type "pip list" in your terminal and send my the result

#

first, for me "from discord import Message, Guild, TextChannel" have no sens

#

hmm

#

Does your bot use a database?

charred abyss
#

@red cypress Don’t use json, use mongodb or another database.

timid moss
#

It is supposed to work with a json

charred abyss
#

Mongodb returns a dictionary

#

aka json

timid moss
#

json too

charred abyss
#

Some people may not help you since you’re using json and it’s not recommended to use for discord bots.

timid moss
#

Flyx, My biggest concern is that I do not understand the purpose of your code, if you give me a better detail it is easier

timid moss
steep drum
#

Just to note JSON is not rlly good for data storage

timid moss
#
{
  "banned_users": [], 
  "ids": [
    "863353708570083359"
  ]
}```

So if I put an id in the ID list it deletes all the messages of the user?
#

the globalchat command sends the user's message to all channels?

#

ok, "banned_users" what is it for?

#

Why do you store the id and name of the users?

#

So the json should look like this?

{
  "ids": [
    863353708570083359
  ]
}
#

I'll try to make you a code that works

timid moss