#πŸ”’ Suggestion for storing data in PostgreSQL.

4 messages Β· Page 1 of 1 (latest)

mystic echo
#

Hi, I wanted to make some ignore commands for my discord bot. Which ignores the usage of command. I want to make these commands:
?ignore <command/module/all> [channel]
?ignore bypass <role>
?ignore reset
but how do I store them in my database (PostgreSQL by NeonTech)? Should I store it in json? example:

ignore(guild_id BIG_INT, json_data TEXT)```
Value for GUILD_ID: `000000000000`
Value for JSON_DATA:
```json
{
  "all": false,
  "command": [{name: channel_id/global},],
  "module": [{name: channel_id/global},],
  "bypass": [{role_id: channel_id/global}]
}```

I am coding in Python v3.11 in discord.py library.
humble treeBOT
#

@mystic echo

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

humble treeBOT
#

@mystic echo

Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.