Open ArtemGr opened 7 years ago
I like this. Something like /r @userid {dicestring}
Hey, @omnilord ! What's the userid be like? Is it the thing that "Copy ID" context menu gives you, something like "125366246245007360"?
In Discord you can use @username as a mention.
cf. #205
We're one step closer to this as I've test the ability for Sidekick to send private messages to people (we can send a message if the user shares a server with the bot).
It's easier to use the integer user ID for that. @username
would require us to maintain a list of users in RAM.
It's easier to use the integer user ID for that.
@username
would require us to maintain a list of users in RAM.
I'm not sure I follow what the issue is. When you get a message from Discord, a user mention that end users see as @username
is encoded with the user id implicitly in the format <@userid>
. You should be able to use a regex /<@!?(?<id>\d+)>/
to grab it on the fly.
Also, depending on the discord library you are using, it probably already provides this utility for you.
When you get a message from Discord, a user mention that end users see as @username is encoded with the user id implicitly in the format <@userid>
Neat!
There's an idea from one of our Patreon backers. To quote: "private rolls directly to the storyteller so only they and a single player can see it"