mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 21:40:51 +02:00
single role fix for cleverbot
This commit is contained in:
@@ -65,10 +65,14 @@ client.on('commandError', (command, err) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
client.on('message', async (msg) => {
|
client.on('message', async (msg) => {
|
||||||
if (msg.author.bot) return;
|
|
||||||
if (msg.channel.type !== 'dm')
|
|
||||||
if (!msg.channel.permissionsFor(client.user).has('SEND_MESSAGES')) return;
|
|
||||||
if (msg.isMentioned(client.user)) {
|
if (msg.isMentioned(client.user)) {
|
||||||
|
if (msg.author.bot) return;
|
||||||
|
if (msg.channel.type !== 'dm') {
|
||||||
|
if (!msg.channel.permissionsFor(client.user).has('SEND_MESSAGES')) return;
|
||||||
|
const singleRole = msg.guild.settings.get('singleRole');
|
||||||
|
if (singleRole)
|
||||||
|
if (!msg.member.roles.has(singleRole)) return;
|
||||||
|
}
|
||||||
msg.channel.startTyping();
|
msg.channel.startTyping();
|
||||||
const message = msg.content.replace(mention, '');
|
const message = msg.content.replace(mention, '');
|
||||||
try {
|
try {
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiaobot",
|
"name": "xiaobot",
|
||||||
"version": "19.3.2",
|
"version": "19.3.3",
|
||||||
"description": "A Discord Bot",
|
"description": "A Discord Bot",
|
||||||
"main": "shardingmanager.js",
|
"main": "shardingmanager.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user