You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new to this.
Sorry for my English (I use a translator).
I started to create a bot for events (guessing riddles).
I created slash commands with parameters.
When listening to these commands, I can reply to the author or to the same channel.
$discord = newDiscord([
'token' => 'token_my_bot',
]);
$discord->on('ready', function ($discord) {
//listening slash commands$discord->listenCommand('ans', function (Interaction$interaction) {
//connect the database$database = newDatabaseGateway();
//checking if a member is in a team, getting the answer to the task and comparing it with the member's answer, etc....//send message DM and delete message in channal$interaction->user->sendMessage($out);
$interaction->respondWithMessage(MessageBuilder::new()->setContent("send PM"));
$interaction->deleteOriginalResponse();
});
});
$discord->run();
I save all members in the database (discord_id, nickname, team_id).
If the team member answered correctly, I want to send the next task to all the members of this team.
How can I do this?
Аnd another question, how to update a message in a special guild channel after a slash command of any of the members.
for example, registering a team or adding a member to a team. a message in a guild channel will display a list of members by team from the database.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi.
I'm new to this.
Sorry for my English (I use a translator).
I started to create a bot for events (guessing riddles).
I created slash commands with parameters.
When listening to these commands, I can reply to the author or to the same channel.
I save all members in the database (discord_id, nickname, team_id).
If the team member answered correctly, I want to send the next task to all the members of this team.
How can I do this?
Аnd another question, how to update a message in a special guild channel after a slash command of any of the members.
for example, registering a team or adding a member to a team. a message in a guild channel will display a list of members by team from the database.
Beta Was this translation helpful? Give feedback.
All reactions