回答編集履歴
1
サンプルを追記
test
CHANGED
@@ -37,3 +37,41 @@
|
|
37
37
|
}
|
38
38
|
|
39
39
|
```
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
## サンプル(17:30ごろ追記)
|
44
|
+
|
45
|
+
```js
|
46
|
+
|
47
|
+
const config = require('./config.json');
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
if (message.content === '特定の言語') {
|
52
|
+
|
53
|
+
message.guild.channels.cache
|
54
|
+
|
55
|
+
.filter(ch => ch.name === '特定のチャンネル')
|
56
|
+
|
57
|
+
.forEach(ch => ch.send('いらっしゃいませ、' + config[message.author.id] + 'さん'));
|
58
|
+
|
59
|
+
}
|
60
|
+
|
61
|
+
```
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
config.json
|
66
|
+
|
67
|
+
```js
|
68
|
+
|
69
|
+
{
|
70
|
+
|
71
|
+
"723052392911863858": "名無し太郎",
|
72
|
+
|
73
|
+
"755774191613247568": "名無し花子",
|
74
|
+
|
75
|
+
}
|
76
|
+
|
77
|
+
```
|