LoginSignup
6
6

More than 5 years have passed since last update.

Discordのbotでリプライを送る方法

Posted at

ユーザーを"@user_name"、役職を"@team_name"とする。

botでそのまま@user_nameと出力しても、userにメンションはされない。

userにbotからメンションを送るには、"<@!user_id>"とする必要がある。("<@!000000000000000000>"のような感じ。)

同じように、役職宛にメンションを許可していても、botから@team_nameとメンションを送ろうとしてもメンションにならない。

こちらは"<@&team_id>"とする必要がある。("<@&000000000000000000>"みたいな。)

このIDをいちいち調べるのが面倒な人は、Discordのアプリで、"\@user_name"や"\@team_name"と打ってやると、エスケープされた状態で出力されるので、簡単。

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6