Skip to content

Conversation

@adityajha2005
Copy link
Contributor

Previously, the bot failed to send tip announcement messages in the Discord channel due to a missing required parameter.

Problem
When a tip was sent, the bot was expected to announce it like this:
@worker #117 @ Gib.Work just sent 0.2 USDC to @d0t!
However, these messages were not appearing in the channel.

Upon investigation, I discovered that the Discord bot’s API endpoint required a guildId parameter, which was not being provided.

Solution
->Added the missing guildId parameter to the message request
->Configured necessary environment variables in the config file

Added validation to ensure the presence of ANNOUNCE_CHANNEL_ID and NEXT_PUBLIC_GUILD_ID environment variables.

@vercel
Copy link
Contributor

vercel bot commented May 9, 2025

@adityajha2005 is attempting to deploy a commit to the gibwork Team on Vercel.

A member of the Team first needs to authorize it.

@shivaji43
Copy link
Contributor

@adityajha2005
This change will only be applied to gibwork server , The bot is now a generalised bot i.e any server can install the bot and use the commands
Hardcoding the channel Id will cause every servers' /tip command message to land in gibwork general channel

Instead

  • Add a new column in servers' table channel_id
  • change the /server-setup command to take input a channel id
  • fetch channel_id associated to server_id by passing server_id in query params of the webapp while tipping and send message in that channel

@shivaji43
Copy link
Contributor

@adityajha2005 hey I made a PR here #64 thanks for giving it a try

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants