mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 14:19:11 +02:00
30 Second Wait in Mod Commands
This commit is contained in:
@@ -39,7 +39,7 @@ module.exports = class BanCommand extends Command {
|
|||||||
await msg.say(`Are you sure you want to ban ${member.user.tag} (${member.id})?`);
|
await msg.say(`Are you sure you want to ban ${member.user.tag} (${member.id})?`);
|
||||||
const msgs = await msg.channel.awaitMessages((res) => res.author.id === msg.author.id, {
|
const msgs = await msg.channel.awaitMessages((res) => res.author.id === msg.author.id, {
|
||||||
max: 1,
|
max: 1,
|
||||||
time: 15000
|
time: 30000
|
||||||
});
|
});
|
||||||
if (!msgs.size || !['y', 'yes'].includes(msgs.first().content.toLowerCase())) return msg.say('Aborting.');
|
if (!msgs.size || !['y', 'yes'].includes(msgs.first().content.toLowerCase())) return msg.say('Aborting.');
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ module.exports = class KickCommand extends Command {
|
|||||||
await msg.say(`Are you sure you want to kick ${member.user.tag} (${member.id})?`);
|
await msg.say(`Are you sure you want to kick ${member.user.tag} (${member.id})?`);
|
||||||
const msgs = await msg.channel.awaitMessages((res) => res.author.id === msg.author.id, {
|
const msgs = await msg.channel.awaitMessages((res) => res.author.id === msg.author.id, {
|
||||||
max: 1,
|
max: 1,
|
||||||
time: 15000
|
time: 30000
|
||||||
});
|
});
|
||||||
if (!msgs.size || !['y', 'yes'].includes(msgs.first().content.toLowerCase())) return msg.say('Aborting.');
|
if (!msgs.size || !['y', 'yes'].includes(msgs.first().content.toLowerCase())) return msg.say('Aborting.');
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ module.exports = class SoftbanCommand extends Command {
|
|||||||
await msg.say(`Are you sure you want to softban ${member.user.tag} (${member.id})?`);
|
await msg.say(`Are you sure you want to softban ${member.user.tag} (${member.id})?`);
|
||||||
const msgs = await msg.channel.awaitMessages((res) => res.author.id === msg.author.id, {
|
const msgs = await msg.channel.awaitMessages((res) => res.author.id === msg.author.id, {
|
||||||
max: 1,
|
max: 1,
|
||||||
time: 15000
|
time: 30000
|
||||||
});
|
});
|
||||||
if (!msgs.size || !['y', 'yes'].includes(msgs.first().content.toLowerCase())) return msg.say('Aborting.');
|
if (!msgs.size || !['y', 'yes'].includes(msgs.first().content.toLowerCase())) return msg.say('Aborting.');
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ module.exports = class UnbanCommand extends Command {
|
|||||||
await msg.say(`Are you sure you want to unban ${member.tag} (${member.id})?`);
|
await msg.say(`Are you sure you want to unban ${member.tag} (${member.id})?`);
|
||||||
const msgs = await msg.channel.awaitMessages((res) => res.author.id === msg.author.id, {
|
const msgs = await msg.channel.awaitMessages((res) => res.author.id === msg.author.id, {
|
||||||
max: 1,
|
max: 1,
|
||||||
time: 15000
|
time: 30000
|
||||||
});
|
});
|
||||||
if (!msgs.size || !['y', 'yes'].includes(msgs.first().content.toLowerCase())) return msg.say('Aborting.');
|
if (!msgs.size || !['y', 'yes'].includes(msgs.first().content.toLowerCase())) return msg.say('Aborting.');
|
||||||
await msg.guild.unban(member, `${msg.author.tag}: ${reason}`);
|
await msg.guild.unban(member, `${msg.author.tag}: ${reason}`);
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ module.exports = class WarnCommand extends Command {
|
|||||||
await msg.say(`Are you sure you want to warn ${member.user.tag} (${member.id})?`);
|
await msg.say(`Are you sure you want to warn ${member.user.tag} (${member.id})?`);
|
||||||
const msgs = await msg.channel.awaitMessages((res) => res.author.id === msg.author.id, {
|
const msgs = await msg.channel.awaitMessages((res) => res.author.id === msg.author.id, {
|
||||||
max: 1,
|
max: 1,
|
||||||
time: 15000
|
time: 30000
|
||||||
});
|
});
|
||||||
if (!msgs.size || !['y', 'yes'].includes(msgs.first().content.toLowerCase())) return msg.say('Aborting.');
|
if (!msgs.size || !['y', 'yes'].includes(msgs.first().content.toLowerCase())) return msg.say('Aborting.');
|
||||||
try {
|
try {
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiaobot",
|
"name": "xiaobot",
|
||||||
"version": "22.1.6",
|
"version": "22.1.7",
|
||||||
"description": "A Discord Bot",
|
"description": "A Discord Bot",
|
||||||
"main": "Shard.js",
|
"main": "Shard.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user