Skip to content

How to send a message to DM or guild channel after listenCommand? #1261

Answered by valzargaming
Eowgik asked this question in Q&A
Discussion options

You must be logged in to vote
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);

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by valzargaming
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants