diskyで特定のロールを持っているか調べたい。

MCIDとdiscordのidを紐づけて、特定のロールを持っていたら参加メッセージを変更したいです。 問題のコード
on join:
if discord id of {discord.id.%UUID of player%} has discord role with id "1308340710218534940" in guild with id "1267345808991322210":
set join message to "&e%player%&aが参加しました"
on join:
if discord id of {discord.id.%UUID of player%} has discord role with id "1308340710218534940" in guild with id "1267345808991322210":
set join message to "&e%player%&aが参加しました"
{discord.id.%UUID of player%}にはdiscordのユーザーidが入っています(881821076601069589) エラー
"1308340710218534940" is not a types.user
"1308340710218534940" is not a types.user
原因がわかる方いましたら、教えていただけると幸いです。
No description
2 Replies
soramame_256
soramame_2565d ago
retrieve user with id "%{discord.id.%uuid of player%}%" from なんかのbot and store it in {_user} if {_user} has discord role with id~~ いやこれちがうな?
on join:
set {_guild} to guild with id "1267345808991322210"
set {_member} to member with id {discord.id.%UUID of player%} in {_guild}
if (roles of {_member}) contains (role with id "1308340710218534940"):
message "aa" to console
on join:
set {_guild} to guild with id "1267345808991322210"
set {_member} to member with id {discord.id.%UUID of player%} in {_guild}
if (roles of {_member}) contains (role with id "1308340710218534940"):
message "aa" to console
こうだね roles of %member%はリストなのでcontainsで条件式書ける discord role with idは多分vixioとかの構文なのでdiscordを省いたら通ります https://disky.me/docs/docs/types/ ドキュメント
shu
shuOP5d ago
動きました!ありがとうございます!
Want results from more Discord servers?
Add your server