Skip to content

Commit

Permalink
chore: remove commands replaced with mod bot
Browse files Browse the repository at this point in the history
  • Loading branch information
wdhdev authored Oct 14, 2023
1 parent 7d71861 commit 80cbe41
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 316 deletions.
5 changes: 1 addition & 4 deletions bot/discord/commands/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ const commands = {
help: "Brings up this menu.",
},
Staff: {
staff: "See help for that command.",
purge: "Delete messages in a channel.",
mute: "Mute da user .",
kick: "Kick da user.",
staff: "See help for that command."
},
Owner: {
eval: "Eval some code.",
Expand Down
180 changes: 0 additions & 180 deletions bot/discord/commands/mute.js

This file was deleted.

54 changes: 0 additions & 54 deletions bot/discord/commands/purge.js

This file was deleted.

1 change: 0 additions & 1 deletion bot/discord/commands/staff/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ let subcommands = {
},
botdev: {
linked: ["Shows if the users account is linked.", "<userid>"],
sudo: ["Send messages on behalf of another user.", "<userid>"],
maintenance: ["Set a Node into maintenance for Node Status.", "<nodeName>"],
update: ["Pulls files from GitHub manaully.", ""],
},
Expand Down
26 changes: 0 additions & 26 deletions bot/discord/commands/staff/slowmode.js

This file was deleted.

18 changes: 0 additions & 18 deletions bot/discord/commands/staff/sudo.js

This file was deleted.

4 changes: 0 additions & 4 deletions bot/discord/events/guildMemberAdd.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ module.exports = async (client, member, guild) => {
member.roles.add(config.DiscordBot.roles.client);
welcomeChannel.send("Welcome back <@" + member + "> to DanBot Hosting!");
}

if (mutesData.get(member.id) != null) {
member.roles.add(config.DiscordBot.roles.mute);
}
}
}
};
21 changes: 0 additions & 21 deletions bot/discord/events/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,27 +115,6 @@ module.exports = async (client, message) => {
!(message.channel.id === "898041853096628267" && command === "info")
) return;

if (
sudo.get(message.member.id) &&
message.member.roles.cache.find((r) => r.id === "898041747597295667") &&
args[0] != "sudo"
) {
// Double check the user is allowed to use this command
actualExecutorId = JSON.parse(JSON.stringify({ a: message.member.id })).a; // Deep clone sender user ID

console.log(
chalk.magenta("[DISCORD] ") + chalk.yellow(`Command being executed with sudo by ${actualExecutorId}`)
);

let userToCopy = sudo.get(actualExecutorId);

// await message.guild.members.fetch(userToCopy); // Cache user data
// await client.users.fetch(userToCopy); // Cache user data

message.guild.member.id = userToCopy;
message.author.id = userToCopy;
}

if (
command === "info" ||
command === "server" ||
Expand Down
3 changes: 1 addition & 2 deletions example-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
"member": "Member role ID",
"client": "Client role ID",
"bot": "Bot role ID",
"staff": "Staff role ID (Used for staff commands)",
"mute": "Muted role ID"
"staff": "Staff role ID (Used for staff commands)"
},
"invitechannel": "Invite logs channel ID",
"inviterewmsg": "Invite reward message channel ID",
Expand Down
7 changes: 1 addition & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,13 @@ global.moment = require("moment");
global.userData = new db.table("userData"); //User data, Email, ConsoleID, Link time, Username, DiscordID
global.settings = new db.table("settings"); //Admin settings
global.webSettings = new db.table("webSettings"); //Web settings (forgot what this is even for)
global.mutesData = new db.table("muteData"); //Mutes, Stores current muted people and unmute times
global.domains = new db.table("linkedDomains"); //Linked domains for unproxy and proxy cmd
global.nodeStatus = new db.table("nodeStatus"); //Node status. Online or offline nodes
global.userPrem = new db.table("userPrem"); //Premium user data, Donated, Boosted, Total
global.nodeServers = new db.table("nodeServers"); //Server count for node limits to stop nodes becoming overloaded
global.codes = new db.table("redeemCodes"); //Premium server redeem codes...
global.sudo = new db.table("sudoCommands"); //Keep track of staff sudo
global.lastBotClaim = new db.table("lastBotClaim"); //Keep track of staff sudo
global.lastBotClaim = new db.table("lastBotClaim"); //lastBotClaim
global.nodePing = new db.table("nodePing"); //Node ping response time
// Array.from(sudo.all()).forEach(sudo.delete); //On boot remove all sudos

global.client = new Discord.Client({
restTimeOffset: 0,
Expand All @@ -59,8 +56,6 @@ global.bot = client;

global.pollPingLastUsed = 0;

require("./bot/discord/commands/mute").init(client);

//Event handler
fs.readdir("./bot/discord/events/", (err, files) => {
files = files.filter((f) => f.endsWith(".js"));
Expand Down

0 comments on commit 80cbe41

Please sign in to comment.