discord Salesbot for star citizen
Budget: $30 – $250 USD
The bot is designed to allow users to list items they want to sell within a specific Discord server. Users can add a listing by issuing a "/sell" command followed by the item's category, quantity, and price per item.
The bot stores the information in a MySQL database with the user's Discord ID and the ID of the Discord server from which the command was issued.
Users can view their own listings within the server by issuing a "/mylist" command, which retrieves the relevant entries from the database based on the user's Discord ID and the server ID. Users can also hide their own listings by issuing a "/delmylist" command and specifying the ID of the entry they wish to hide.
The bot sets a "hidden" flag on the entry in the database instead of deleting it, which allows users to unhide the entry later if they wish.
The bot also allows users to view all non-hidden listings within the server by issuing a "/list" command. The bot retrieves the relevant entries from the database based on the server ID and sorts them by item category.
To prevent users from adding incorrect or nonexistent categories, the bot only allows specific pre-defined categories of items to be listed. These categories are as follows:
XX
XX
the bot allows users to add and delete webhook URLs. When a user adds a webhook URL, the bot sends a message to the URL every time a sell or buy command is issued. This allows users to receive notifications about new listings or purchases in real-time.
/sell: This command is used to add a new sale item to the database. It allows users to select a category, enter a quantity, and set a price per item. The command stores this data in a remote MySQL database, along with the user's Discord ID and the ID of the Discord server where the command was issued from.
/mylist: This command displays all the sale entries made by the user who issues the command, excluding hidden entries. It retrieves the data from the database based on the user's Discord ID and the ID of the Discord server where the command was issued from.
/delmylist: This command allows users to hide their sale entries by specifying the entry ID. The command checks if the entry belongs to the user and the Discord server where the command was issued from before hiding it. Entries not created by the user or not belonging to the server will not be listed or hidden. Instead of deleting the entry, it sets the hidden flag in the database.
/list: This command displays all non-hidden sale entries in the database, sorted by the product name. It shows the user who created the entry, the product type, quantity, and price. It only displays the entries belonging to the Discord server where the command was issued from.
/buy: This command is used to request to buy a sale item. It allows users to select a category, enter a quantity, and set a maximum price per item. The bot will send a webhook to all the webhook URLs previously added by the user. The webhook contains information about the requested item, including the user's Discord ID and the ID of the Discord server where the command was issued from.
/addwebhook: This command is used to add a new webhook URL to the bot. The URL will be saved in the remote MySQL database, along with the user's Discord ID and the ID of the Discord server where the command was issued from. The bot will send a confirmation message if the webhook was successfully added.
/listwebhooks: This command displays all the webhook URLs previously added by the user. It retrieves the data from the database based on the user's Discord ID and the ID of the Discord server where the command was issued from.
/delwebhook: This command allows users to delete a webhook URL previously added by them. It retrieves the data from the database based on the user's Discord ID, the ID of the Discord server where the command was issued from, and the webhook ID specified by the user. The bot will send a confirmation message if the webhook was successfully deleted.
The bot stores the information in a MySQL database with the user's Discord ID and the ID of the Discord server from which the command was issued.
Users can view their own listings within the server by issuing a "/mylist" command, which retrieves the relevant entries from the database based on the user's Discord ID and the server ID. Users can also hide their own listings by issuing a "/delmylist" command and specifying the ID of the entry they wish to hide.
The bot sets a "hidden" flag on the entry in the database instead of deleting it, which allows users to unhide the entry later if they wish.
The bot also allows users to view all non-hidden listings within the server by issuing a "/list" command. The bot retrieves the relevant entries from the database based on the server ID and sorts them by item category.
To prevent users from adding incorrect or nonexistent categories, the bot only allows specific pre-defined categories of items to be listed. These categories are as follows:
XX
XX
the bot allows users to add and delete webhook URLs. When a user adds a webhook URL, the bot sends a message to the URL every time a sell or buy command is issued. This allows users to receive notifications about new listings or purchases in real-time.
/sell: This command is used to add a new sale item to the database. It allows users to select a category, enter a quantity, and set a price per item. The command stores this data in a remote MySQL database, along with the user's Discord ID and the ID of the Discord server where the command was issued from.
/mylist: This command displays all the sale entries made by the user who issues the command, excluding hidden entries. It retrieves the data from the database based on the user's Discord ID and the ID of the Discord server where the command was issued from.
/delmylist: This command allows users to hide their sale entries by specifying the entry ID. The command checks if the entry belongs to the user and the Discord server where the command was issued from before hiding it. Entries not created by the user or not belonging to the server will not be listed or hidden. Instead of deleting the entry, it sets the hidden flag in the database.
/list: This command displays all non-hidden sale entries in the database, sorted by the product name. It shows the user who created the entry, the product type, quantity, and price. It only displays the entries belonging to the Discord server where the command was issued from.
/buy: This command is used to request to buy a sale item. It allows users to select a category, enter a quantity, and set a maximum price per item. The bot will send a webhook to all the webhook URLs previously added by the user. The webhook contains information about the requested item, including the user's Discord ID and the ID of the Discord server where the command was issued from.
/addwebhook: This command is used to add a new webhook URL to the bot. The URL will be saved in the remote MySQL database, along with the user's Discord ID and the ID of the Discord server where the command was issued from. The bot will send a confirmation message if the webhook was successfully added.
/listwebhooks: This command displays all the webhook URLs previously added by the user. It retrieves the data from the database based on the user's Discord ID and the ID of the Discord server where the command was issued from.
/delwebhook: This command allows users to delete a webhook URL previously added by them. It retrieves the data from the database based on the user's Discord ID, the ID of the Discord server where the command was issued from, and the webhook ID specified by the user. The bot will send a confirmation message if the webhook was successfully deleted.