How to send a message to DM or guild channel after listenCommand? #1261
Replies: 1 comment
-
if ($guild = $interaction->discord->guilds->get('id', 'some_guild_id'))
if ($members = $guild->members->filter(fn(Member $member) => someFuncToCompareYourMembers($member)))
foreach ($members as $member) $member->user->sendMessage($out); if ($guild = $interaction->discord->guilds->get('id', 'some_guild_id'))
if ($channel = $guild->channels->get('id', 'some_channel_id'))
$channel->sendMessage($out); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
valzargaming
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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