changed most discord actions to be handled by 1 script. this should cut down on errors and allow you to actually use the bot in other servers (i think)

This commit is contained in:
ayeuhugyu 2023-09-30 08:17:43 -07:00
parent c97762e84c
commit b7492c8ad0
30 changed files with 262 additions and 684 deletions

View file

@ -17,6 +17,10 @@ clean up p/vileimagery, its horrendous
**_Note:_** _versions before this were not uploaded to the repo, this is not the first version._
1.12 - changed most discord actions to be handled by 1 script. this should cut down on errors and allow you to actually use the bot in other servers (i think)
---
1.11 - added PEPPERBOT VOICE CHAT CAPABILITY
1.11.1 - added ability to upload custom soundboard files

View file

@ -1,4 +1,5 @@
import fs from "fs";
import * as action from "../util/discordAction.js";
const prefix = process.env.PREFIX;
function delay(time) {
@ -20,11 +21,14 @@ export default {
const msgnoprefix = message.content.slice(
prefix.length + this.name.length + 1
);
const msg = msgnoprefix.slice(0, 2000);
const user = msgnoprefix.slice(0, 2000);
if (msg !== "") {
fs.appendFileSync("../pepperbot/data/guildmembers.log", msg + "\n");
message.reply(`operation completed (🤖); added ${msg} to members file`);
if (user !== "") {
fs.appendFileSync("../pepperbot/data/guildmembers.log", user + "\n");
action.reply(
message,
`operation completed (🤖); added ${user} to members file`
);
}
}
},

View file

@ -1,4 +1,5 @@
import fs from "fs";
import * as action from "../util/discordAction.js";
import request from "request"; // yes i know this is deprecated i will fix it later (no i won't)
function download(url, filename) {
@ -57,7 +58,8 @@ export default {
filename
);
if (success) {
message.reply(
action.reply(
message,
`downloaded your file to \`resources/soundboard/${filename
.toLowerCase()
.replaceAll(" ", "_")
@ -67,30 +69,39 @@ export default {
)}\`, if this name is different than the one you put, that's normal. all files are lowercased and "fixed."`
);
} else {
message.reply(
action.reply(
message,
"an unknown error occurred while attempting to download your file. see the console for details (id put it here but its probably too long for discord)"
);
}
} else {
message.reply(
`invalid file name! the file name either already exists, or you named it ls. don't name it ls.`
action.reply(
message,
`invalid file name! the file name either already exists, or you named it ls. don't name it ls. detected file name: \`${filename}\``
);
}
} else {
message.reply(
`invalid file name! the file name either already exists, or you named it ls. don't name it ls.`
action.reply(
message,
`invalid file name! the file name either already exists, or you named it ls. don't name it ls. detected file name: \`${filename}\``
);
}
} else {
message.reply("error has occurred; filename could not be split");
}
} else {
message.reply(
"invalid file extention; only `mp3`, `wav`, and `ogg` files are supported"
action.reply(
message,
"error has occurred; filename could not be split"
);
}
} else {
message.reply("no file detected");
action.reply(
message,
`invalid file extention; only \`mp3\`, \`wav\`, and \`ogg\` files are supported. \`${
filename.split(".")[1]
}\` is not.`
);
}
} else {
action.reply(message, "no file detected");
}
},
};

View file

@ -1,4 +1,5 @@
import { EmbedBuilder } from "discord.js";
import * as action from "../util/discordAction.js";
import fs from "fs";
export default {
@ -17,14 +18,11 @@ export default {
const command = await import(`./${file}`);
text += `p/${command.default.name} - ${command.default.description} - command arguments: ${command.default.arguments}\n \n`;
}
const embed = new EmbedBuilder();
const embed = action.createEmbed();
embed.setTitle("PepperBot Commands");
embed.setDescription(text);
embed.setColor(0xff0000);
embed.setThumbnail(
"https://cdn.discordapp.com/attachments/755150633191080073/1149152214850469908/Map_Icon.png"
);
message.reply({ embeds: [embed] });
action.reply(message, { embeds: [embed] });
})();
},
};

View file

@ -1,5 +1,6 @@
const whitelist = ["440163494529073152"];
import fs from "fs";
import * as action from "../util/discordAction.js";
import { default as log } from "../util/log.js";
export default {
name: "crash",
@ -7,26 +8,17 @@ export default {
arguments: "none",
execute(message, args) {
if (whitelist.includes(message.author.id)) {
message.reply("crashing bot...");
fs.appendFileSync(
"../pepperbot/src/logs/errors.log",
action.reply(message, "crashing bot...");
log(
"errors.log",
message,
import.meta.url,
"force crashed at " + Date() + "\n"
);
throw "crash command executed";
} else {
message.reply("UNAUTHORIZED");
action.reply(message, "UNAUTHORIZED");
const path = require("path");
const scriptName = path.basename(__filename);
fs.appendFileSync(
"../pepperbot/src/logs/failed.log",
"non whitelisted user " +
message.author.username +
" (" +
message.author +
") attempted accessing " +
scriptName +
"\n"
);
}
},
};

View file

@ -1,58 +1,7 @@
import discord from "discord.js";
//const emojiRegex = require("emoji-regex");
//const irregularsRegex = require("../util/irregularsRegex.js");
//const irregulars = require("../util/irregulars.json");
import * as action from "../util/discordAction.js";
import fs from "fs";
import { default as log } from "../util/log.js";
/*const getEmojis = (message) => {
const { content } = message;
const result = [];
// Normal emojis
const normalEmojis = content.match(emojiRegex());
if (normalEmojis) {
// for (const emoji of normalEmojis) {
normalEmojis.forEach((emoji) => {
result.push(emoji);
});
}
// Text emojis e.g ♥ ✂ 🗨
const textEmojis = content.match(irregularsRegex());
if (textEmojis) {
textEmojis.forEach((emoji) => {
result.push(irregulars[emoji.trim()]);
});
}
// Guild emojis
let guildEmojis = content.match(/:[_a-zA-Z0-9]*>/g);
if (guildEmojis) {
guildEmojis = guildEmojis.map((e) => e.substring(1, e.length - 1));
guildEmojis.forEach((e) => {
try {
const guildEmoji = message.guild.emojis.get(e);
if (guildEmoji) {
result.push(guildEmoji);
}
} catch (error) {
console.log(error);
console.log("tried using guild emote lmao");
}
});
}
// Attempt to sort the results if its not null
if (result) {
const query = message.content;
result.sort((a, b) => {
const irregularA = getKeyByValue(irregulars, a);
const irregularB = getKeyByValue(irregulars, b);
const index1 = irregularA || a;
const index2 = irregularB || b;
return query.indexOf(index1) - query.indexOf(index2);
});
}
return result;
};*/
let collectors = [];
const whitelist = ["440163494529073152", "436321340304392222"];
@ -62,9 +11,9 @@ export default {
description: "creates reaction role, requires whitelist",
arguments: "emoji, user",
execute(message, args) {
(async () => {
if (whitelist.includes(message.author.id)) {
let emojis = getEmojis(message);
let emoji = emojis[0];
let emoji = args[0];
let role = message.mentions.roles.first();
if (!role) {
log("failed.log", message, __filename, `role variable missing`);
@ -75,24 +24,23 @@ export default {
return;
}
const embed = new discord.EmbedBuilder();
embed.setThumbnail(
"https://cdn.discordapp.com/attachments/755150633191080073/1149152214850469908/Map_Icon.png"
);
embed.setColor(0xff0000);
const embed = action.createEmbed();
embed.setTitle(role.name);
embed.setDescription(
"React with " + emoji + " to recieve the " + role.name + " role."
);
message.channel.send({ embeds: [embed] }).then((m) => m.react(emoji));
const reactMessage = await action.sendMessage(message.channelId, {
embeds: [embed],
});
const collectorFilter = function (reaction) {
return true;
};
reactMessage.react(emoji);
const collector = message.createReactionCollector({
filter: collectorFilter,
});
@ -102,16 +50,10 @@ export default {
console.log(`Collected ${reaction.emoji.name} from ${user.tag}`);
});
} else {
message.reply("UNAUTHORIZED");
action.reply(message, "UNAUTHORIZED");
const path = require("path");
const scriptName = path.basename(__filename);
log(
"failed.log",
message,
__filename,
`non whitelisted user ${message.author.username} (${message.author}) attempted accessing ${scriptName}`
);
fs.appendFileSync("../pepperbot/src/logs/failed.log");
}
})();
},
};

View file

@ -1,15 +1,8 @@
import { default as log } from "../util/log.js";
import * as dotenv from "dotenv";
dotenv.config();
import * as action from "../util/discordAction.js";
const prefix = process.env.PREFIX;
function delay(time) {
return new Promise((resolve) => {
setTimeout(resolve, time);
});
}
export default {
name: "dmuser",
description: "forces bot to dm a user something (this will ghost ping them)",
@ -18,23 +11,24 @@ export default {
const user = message.mentions.users.first();
const guild = message.guild;
if (!user) {
user = args[0];
if (!user) {
return;
}
}
const msgnoprefix = message.content.slice(
prefix.length + this.name.length + user.id.length + 4
);
console.log(typeof user);
console.log(user.username);
const msg = msgnoprefix.slice(0, 2000);
let ableToSend = true;
if (msg !== "") {
user.send(msg).catch(() => {
message.channel.send(
action.sendMessage(
message.channelId,
`${message.author}, cannot send message to ${user}, this is usually caused by them not being inside the server`
);
log(
@ -45,9 +39,7 @@ export default {
);
ableToSend = false;
});
if (message.deletable) {
message.delete();
}
action.messageDelete(message);
if (ableToSend) {
log(
"forcesay.log",

View file

@ -1,6 +1,5 @@
import fs from "fs";
import * as dotenv from "dotenv";
dotenv.config();
import * as action from "../util/discordAction.js";
const prefix = process.env.PREFIX;
@ -12,19 +11,19 @@ export default {
const msgnoprefix = message.content.slice(prefix.length + this.name.length);
const name = msgnoprefix.slice(0, 2000);
const jsonstring = fs.readFileSync("../pepperbot/data/eulogies.json");
const parsedeulogies = JSON.parse(jsonstring);
const maxRan = parsedeulogies.eulogies.length;
const parsedEulogies = JSON.parse(jsonstring);
const maxRan = parsedEulogies.eulogies.length;
const randomnum = Math.floor(Math.random() * maxRan);
const eulogy = parsedeulogies.eulogies[randomnum];
const eulogy = parsedEulogies.eulogies[randomnum];
if (name.replaceAll(" ", "") === "") {
message.reply("no name supplied");
action.reply(message, "no name supplied");
return;
}
const parsedeulogy = eulogy.replaceAll("##NAME", name);
message.reply(parsedeulogy);
const replacedEulogy = eulogy.replaceAll("##NAME", name);
action.reply(message, replacedEulogy);
},
};

View file

@ -1,8 +1,10 @@
import * as action from "../util/discordAction.js";
export default {
name: "git",
description: "posts open pepper repo",
arguments: "none",
execute(message, args) {
message.reply("https://git.reidlab.online/ayeuhugyu/PepperBot");
action.reply(message, "https://git.reidlab.online/ayeuhugyu/PepperBot");
},
};

View file

@ -1,3 +1,5 @@
import * as action from "../util/discordAction.js";
export default {
name: "guildmembers",
description:
@ -5,7 +7,7 @@ export default {
arguments: "none",
execute(message, args) {
const path = `../pepperbot/data/guildmembers.log`;
message.channel.send({
action.sendMessage(message.channelId, {
files: [
{
attachment: path,

View file

@ -1,6 +1,5 @@
import { joinVoiceChannel } from "@discordjs/voice";
import * as dotenv from "dotenv";
dotenv.config();
import * as action from "../util/discordAction.js";
const guildId = process.env.GUILD_ID;
@ -18,9 +17,9 @@ export default {
adapterCreator: voiceState.guild.voiceAdapterCreator,
});
message.reply(`connected to <#${voiceState.channelId}>`);
action.reply(message, `connected to <#${voiceState.channelId}>`);
} else {
message.reply("u aint connected to a voice channel blud 😂😂😂");
action.reply(message, "u aint connected to a voice channel blud 😂😂😂");
}
},
};

View file

@ -1,4 +1,5 @@
import { getVoiceConnection } from "@discordjs/voice";
import * as action from "../util/discordAction.js";
export default {
name: "leavevc",
@ -8,9 +9,12 @@ export default {
if (getVoiceConnection(message.guild.id)) {
const connection = getVoiceConnection(message.guild.id);
connection.destroy();
message.reply(`left voice channel <#${connection.joinConfig.channelId}>`);
action.reply(
message,
`left voice channel <#${connection.joinConfig.channelId}>`
);
} else {
message.reply("im not connected to a voice channel here mf");
action.reply(message, "im not connected to a voice channel here mf");
}
},
};

View file

@ -1,22 +1,18 @@
import { EmbedBuilder } from "discord.js";
import * as action from "../util/discordAction.js";
export default {
name: "links",
description: 'posts "important" links',
arguments: "none",
execute(message, args) {
const embed = new EmbedBuilder();
const embed = action.createEmbed();
embed.setTitle("very imphortance linkers");
embed.setThumbnail(
"https://cdn.discordapp.com/attachments/755150633191080073/1149152214850469908/Map_Icon.png"
);
embed.setColor(0xff0000);
embed.setDescription(`
https://reidlab.online
https://goop.network -- VERY IMPORTANT!!!!
pepper.church releasing [TIME] (never (not anytime soon))
`);
message.reply({ embeds: [embed] });
action.reply(message, { embeds: [embed] });
},
};

View file

@ -1,9 +1,12 @@
import * as action from "../util/discordAction.js";
export default {
name: "mymovie",
description: "posts my movie",
arguments: "none",
execute(message, args) {
message.reply(
action.reply(
message,
"https://cdn.discordapp.com/attachments/755150633191080073/1149158052784775219/My_Movie.mp4"
);
},

View file

@ -1,4 +1,4 @@
import { EmbedBuilder } from "discord.js";
import * as action from "../util/discordAction.js";
import fs from "fs";
export default {
@ -11,11 +11,10 @@ export default {
const randomnum = Math.floor(Math.random() * maxRan);
const embed = new EmbedBuilder();
const embed = action.createEmbed();
embed.setTitle("RANDOM PEPPER!!!");
embed.setImage(`attachment://${peppers[randomnum]}`);
embed.setColor(0xff0000);
message.reply({
action.reply(message, {
embeds: [embed],
files: [`../pepperbot/resources/peppers/${peppers[randomnum]}`],
});

View file

@ -1,13 +1,8 @@
import { default as log } from "../util/log.js";
import * as action from "../util/discordAction.js";
const prefix = process.env.PREFIX;
function delay(time) {
return new Promise((resolve) => {
setTimeout(resolve, time);
});
}
export default {
name: "say",
description: "forces bot to say something",
@ -18,10 +13,8 @@ export default {
const msg = msgnoprefix.slice(0, 2000);
if (msg !== "") {
message.channel.send(msg);
if (message.deletable) {
message.delete();
}
action.sendMessage(message.channelId, msg);
action.messageDelete(message);
log(
"forcesay.log",
message,

View file

@ -1,4 +1,5 @@
const ignore = ["console.log"];
import * as action from "../util/discordAction.js";
import fs from "fs";
export default {
@ -22,13 +23,13 @@ export default {
.readdirSync("../pepperbot/logs/")
.filter((file) => file.endsWith(".log"));
if (!logs.includes(msgnoprefix)) {
message.reply("invalid log file");
action.reply(message, "invalid log file");
return;
}
if (ignore.includes(msgnoprefix)) return;
const path = `../pepperbot/logs/${msgnoprefix}`;
if (!mobileMode) {
message.channel.send({
action.sendMessage(message.channelId, {
files: [
{
attachment: path,
@ -39,7 +40,8 @@ export default {
} else {
const filestring = fs.readFileSync(path, "utf8");
console.log(typeof filestring);
message.channel.send(
action.sendMessage(
message.channelId,
filestring.slice(filestring.length - 500, filestring.length)
);
}

View file

@ -5,8 +5,7 @@ import {
joinVoiceChannel,
} from "@discordjs/voice";
import fs from "fs";
import * as dotenv from "dotenv";
dotenv.config();
import * as action from "../util/discordAction.js";
const prefix = process.env.PREFIX;
@ -59,7 +58,8 @@ export default {
}
if (!file && !lsmode && !stopmode) {
message.reply(
action.reply(
message,
"unable to find your file in the soundboard folder put `ls` as your args to upload a file of all names. try replacing spaces with _s. you proposed: " +
proposedfilename
);
@ -78,9 +78,10 @@ export default {
adapterCreator: voiceState.guild.voiceAdapterCreator,
});
message.reply(`connected to <#${voiceState.channelId}>`);
action.reply(message, `connected to <#${voiceState.channelId}>`);
} else {
message.reply(
action.reply(
message,
"the bot is not in a voice channel so a sound cannot be played, and you are not in a voice channel so it can't auto join. IDIOT!"
);
return;
@ -90,7 +91,7 @@ export default {
connection.subscribe(audioPlayer);
audioPlayer.play(audioResource);
} else {
message.channel.send({
action.sendMessage(message.channelId, {
files: [
{
attachment: "resources/soundboard/ls.txt",

View file

@ -1,14 +1,24 @@
import * as action from "../util/discordAction.js";
export default {
name: "test",
description: "test command",
arguments: "all",
execute(message, args) {
let text =
"command arguments test \nthis list should include all arguments you included in the command \n";
for (let i = 0; i < args.length; i++) {
text += args[i] + "\n";
}
message.reply(text);
(async () => {
action.sendMessage(message.channelId, "channel send test");
action.sendMainMessage("main message test");
action.sendError("error test");
const embed = action.createEmbed();
embed.setTitle("EMBED TITLE");
embed.setDescription("EMBED DESCRIPTION");
action.sendMessage(message.channelId, { embeds: [embed] });
const msg = await action.sendMainMessage("test");
action.messageDelete(msg);
action.reply(
message,
"discord action script test completed without errors"
);
})();
},
};

View file

@ -1,5 +1,7 @@
import { EmbedBuilder } from "discord.js";
import fs from "fs";
import * as action from "../util/discordAction.js";
const prefix = process.env.PREFIX;
export default {
@ -10,7 +12,7 @@ export default {
let proposedfilename = message.content.slice(
prefix.length + this.name.length + 1
);
const embed = new EmbedBuilder();
const embed = action.createEmbed();
const images = fs
.readdirSync("../pepperbot/resources/vileimagery")
.filter((file) => file.endsWith(".png"));
@ -49,12 +51,12 @@ export default {
}
embed.setColor(0xff0000);
if (!lsMode) {
message.reply({
action.reply(message, {
embeds: [embed],
files: [`../pepperbot/resources/vileimagery/${file}`],
});
} else {
message.channel.send({
action.sendMessage(message.channelId, {
files: [
{
attachment: path,

View file

@ -64,6 +64,8 @@ export default function (message, client) {
`use of command: ${command} by: ${message.author.username} (\`${message.author}\`)"`,
true
);
(async () => {
commands.get(command).execute(message, args, client);
})();
}
}

View file

@ -2,7 +2,7 @@ import { GatewayIntentBits, Partials, Client } from "discord.js";
import events from "./events/importEvents.js";
import register from "./register-commands.js";
const client = new Client({
export const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers,

View file

@ -27,7 +27,7 @@ async () => {
);
}
};
console.log(commands);
//console.log(commands);
const rest = new REST().setToken(process.env.TOKEN);

View file

@ -1,23 +0,0 @@
const fs = require('fs');
const path = require('path');
const input = fs.readFileSync(path.resolve(__dirname, './irregulars.txt'), {
encoding: 'utf-8',
});
const data = input.split('\n');
const lines = data
.map((entry, i, arr) => {
const emojis = entry.split(',');
let jsonLine = ` "${emojis[1]}": "${emojis[0]}"`;
if (arr.length - 1 !== i) jsonLine += ',';
return jsonLine;
})
.join('\n');
const json = `{\n${lines}\n}`;
fs.writeFileSync(path.resolve(__dirname, 'irregulars.json'), json, {
encoding: 'utf-8',
});

View file

@ -1,25 +0,0 @@
const fs = require('fs');
const path = require('path');
const base = '/❤/g';
const input = fs.readFileSync(path.resolve(__dirname, 'irregulars.txt'), {
encoding: 'utf-8',
});
const data = input.split('\n');
const piped = data
.map(emoji => {
const raw = emoji.split(',')[1];
return raw.replace(/\*/g, '\\*');
})
.join('|');
const regex = base.replace(/❤/g, piped);
const js = `module.exports = () => ${regex};`;
fs.writeFileSync(path.resolve(__dirname, 'irregularsRegex.js'), js, {
encoding: 'utf-8',
});

82
src/util/discordAction.js Normal file
View file

@ -0,0 +1,82 @@
import discord from "discord.js";
import { default as log } from "./log.js";
import * as index from "../index.js";
const client = index.client;
export async function sendMainMessage(message) {
const channel = client.channels.cache.get("1148814162273763418");
const msg = await channel.send(message);
return msg;
}
export function sendError(message) {
const channel = client.channels.cache.get("1148814162273763418");
let msg;
try {
msg = channel.send(`**error:** ${message}`);
} catch (err) {
console.log(err);
return undefined;
}
return msg;
}
export function messageDelete(message) {
if (!message) {
sendError("attempt to delete undefined message");
return undefined;
}
if (message.deletable) {
message.delete();
} else {
sendError(
`unable to delete message: ${message.url}. most likely caused by invalid permissions`
);
console.log(
`unable to delete message: ${message.url}. most likely caused by invalid permissions`
);
return undefined;
}
}
export function sendMessage(channelId, message) {
(async () => {
const channel = client.channels.cache.get(channelId);
let msg;
if (channel) {
try {
msg = await channel.send(message);
return msg;
} catch (err) {
sendError(err.slice(err.length - 1750, err.length));
console.log(err);
return undefined;
}
} else {
sendError(`unable to find channel: <#${channelId}>`);
}
})();
}
export function reply(triggerMessage, message) {
try {
(async () => {
let msg = await triggerMessage.reply(message);
return msg;
})();
} catch (err) {
sendError(err.slice(err.length - 1750, err.length));
console.log(err);
return undefined;
}
}
export function createEmbed() {
const embed = new discord.EmbedBuilder();
embed.setColor(0xff0000);
embed.setThumbnail(
"https://cdn.discordapp.com/attachments/755150633191080073/1149152214850469908/Map_Icon.png"
);
return embed;
}

View file

@ -1,204 +0,0 @@
{
"🅰": ":a:",
"🅱": ":b:",
"🅾": ":o2:",
"🅿": ":parking:",
"🈂": ":sa:",
"🈷": ":u6708:",
"🌡": ":thermometer:",
"🌤": ":white_sun_small_cloud:",
"🌥": ":white_sun_cloud:",
"🌦": ":white_sun_rain_cloud:",
"🌧": ":cloud_rain:",
"🌨": ":cloud_snow:",
"🌩": ":cloud_lightning:",
"🌪": ":cloud_tornado:",
"🌫": ":fog:",
"🌬": ":wind_blowing_face:",
"🌶": ":hot_pepper:",
"🍽": ":fork_knife_plate:",
"🎖": ":military_medal:",
"🎗": ":reminder_ribbon:",
"🎙": ":microphone2:",
"🎚": ":level_slider:",
"🎛": ":control_knobs:",
"🎞": ":film_frames:",
"🎟": ":tickets:",
"🏍": ":motorcycle:",
"🏎": ":race_car:",
"🏔": ":mountain_snow:",
"🏕": ":camping:",
"🏖": ":beach:",
"🏗": ":construction_site:",
"🏘": ":homes:",
"🏙": ":cityscape:",
"🏚": ":house_abandoned:",
"🏛": ":classical_building:",
"🏜": ":desert:",
"🏝": ":island:",
"🏞": ":park:",
"🏟": ":stadium:",
"🏳": ":flag_white:",
"🏵": ":rosette:",
"🏷": ":label:",
"🐿": ":chipmunk:",
"👁‍🗨": ":eye_in_speech_bubble:",
"👁": ":eye:",
"📽": ":projector:",
"🕉": ":om_symbol:",
"🕊": ":dove:",
"🕯": ":candle:",
"🕰": ":clock:",
"🕳": ":hole:",
"🕶": ":dark_sunglasses:",
"🕷": ":spider:",
"🕸": ":spider_web:",
"🕹": ":joystick:",
"🖇": ":paperclips:",
"🖊": ":pen_ballpoint:",
"🖋": ":pen_fountain:",
"🖌": ":paintbrush:",
"🖍": ":crayon:",
"🖥": ":desktop:",
"🖨": ":printer:",
"🖱": ":mouse_three_button:",
"🖲": ":trackball:",
"🖼": ":frame_photo:",
"🗂": ":dividers:",
"🗃": ":card_box:",
"🗄": ":file_cabinet:",
"🗑": ":wastebasket:",
"🗒": ":notepad_spiral:",
"🗓": ":calendar_spiral:",
"🗜": ":compression:",
"🗝": ":key2:",
"🗞": ":newspaper2:",
"🗡": ":dagger:",
"🗣": ":speaking_head:",
"🗨": ":speech_left:",
"🗯": ":anger_right:",
"🗳": ":ballot_box:",
"🗺": ":map:",
"🛋": ":couch:",
"🛍": ":shopping_bags:",
"🛎": ":bellhop:",
"🛏": ":bed:",
"🛠": ":tools:",
"🛡": ":shield:",
"🛢": ":oil:",
"🛣": ":motorway:",
"🛤": ":railway_track:",
"🛥": ":motorboat:",
"🛩": ":airplane_small:",
"🛰": ":satellite_orbital:",
"🛳": ":cruise_ship:",
"‼": ":bangbang:",
"⁉": ":interrobang:",
"": ":information_source:",
"↔": ":left_right_arrow:",
"↕": ":arrow_up_down:",
"↖": ":arrow_upper_left:",
"↗": ":arrow_upper_right:",
"↘": ":arrow_lower_right:",
"↙": ":arrow_lower_left:",
"↩": ":leftwards_arrow_with_hook:",
"↪": ":arrow_right_hook:",
"#⃣": ":hash:",
"⌨": ":keyboard:",
"⏏": ":eject:",
"⏭": ":track_next:",
"⏮": ":track_previous:",
"⏯": ":play_pause:",
"⏱": ":stopwatch:",
"⏲": ":timer:",
"⏸": ":pause_button:",
"⏹": ":stop_button:",
"⏺": ":record_button:",
"Ⓜ": ":m:",
"▪": ":black_small_square:",
"▫": ":white_small_square:",
"▶": ":arrow_forward:",
"◀": ":arrow_backward:",
"◻": ":white_medium_square:",
"◼": ":black_medium_square:",
"☀": ":sunny:",
"☁": ":cloud:",
"☂": ":umbrella2:",
"☃": ":snowman2:",
"☄": ":comet:",
"☎": ":telephone:",
"☑": ":ballot_box_with_check:",
"☘": ":shamrock:",
"☠": ":skull_crossbones:",
"☢": ":radioactive:",
"☣": ":biohazard:",
"☦": ":orthodox_cross:",
"☪": ":star_and_crescent:",
"☮": ":peace:",
"☯": ":yin_yang:",
"☸": ":wheel_of_dharma:",
"☹": ":frowning2:",
"☺": ":relaxed:",
"♠": ":spades:",
"♣": ":clubs:",
"♥": ":hearts:",
"♦": ":diamonds:",
"♨": ":hotsprings:",
"♻": ":recycle:",
"⚒": ":hammer_pick:",
"⚔": ":crossed_swords:",
"⚖": ":scales:",
"⚗": ":alembic:",
"⚙": ":gear:",
"⚛": ":atom:",
"⚜": ":fleur_de_lis:",
"⚠": ":warning:",
"⚰": ":coffin:",
"⚱": ":urn:",
"⛈": ":thunder_cloud_rain:",
"⛏": ":pick:",
"⛑": ":helmet_with_cross:",
"⛓": ":chains:",
"⛩": ":shinto_shrine:",
"⛰": ":mountain:",
"⛱": ":beach_umbrella:",
"⛴": ":ferry:",
"⛷": ":skier:",
"⛸": ":ice_skate:",
"✂": ":scissors:",
"✈": ":airplane:",
"✉": ":envelope:",
"✏": ":pencil2:",
"✒": ":black_nib:",
"✔": ":heavy_check_mark:",
"✖": ":heavy_multiplication_x:",
"✝": ":cross:",
"✡": ":star_of_david:",
"✳": ":eight_spoked_asterisk:",
"✴": ":eight_pointed_black_star:",
"❄": ":snowflake:",
"❇": ":sparkle:",
"❣": ":heart_exclamation:",
"❤": ":heart:",
"➡": ":arrow_right:",
"⤴": ":arrow_heading_up:",
"⤵": ":arrow_heading_down:",
"*⃣": ":asterisk:",
"⬅": ":arrow_left:",
"⬆": ":arrow_up:",
"⬇": ":arrow_down:",
"0⃣": ":zero:",
"〰": ":wavy_dash:",
"〽": ":part_alternation_mark:",
"1⃣": ":one:",
"2⃣": ":two:",
"㊗": ":congratulations:",
"㊙": ":secret:",
"3⃣": ":three:",
"4⃣": ":four:",
"5⃣": ":five:",
"6⃣": ":six:",
"7⃣": ":seven:",
"8⃣": ":eight:",
"9⃣": ":nine:"
}

View file

@ -1,202 +0,0 @@
:a:,🅰
:b:,🅱
:o2:,🅾
:parking:,🅿
:sa:,🈂
:u6708:,🈷
:thermometer:,🌡
:white_sun_small_cloud:,🌤
:white_sun_cloud:,🌥
:white_sun_rain_cloud:,🌦
:cloud_rain:,🌧
:cloud_snow:,🌨
:cloud_lightning:,🌩
:cloud_tornado:,🌪
:fog:,🌫
:wind_blowing_face:,🌬
:hot_pepper:,🌶
:fork_knife_plate:,🍽
:military_medal:,🎖
:reminder_ribbon:,🎗
:microphone2:,🎙
:level_slider:,🎚
:control_knobs:,🎛
:film_frames:,🎞
:tickets:,🎟
:motorcycle:,🏍
:race_car:,🏎
:mountain_snow:,🏔
:camping:,🏕
:beach:,🏖
:construction_site:,🏗
:homes:,🏘
:cityscape:,🏙
:house_abandoned:,🏚
:classical_building:,🏛
:desert:,🏜
:island:,🏝
:park:,🏞
:stadium:,🏟
:flag_white:,🏳
:rosette:,🏵
:label:,🏷
:chipmunk:,🐿
:eye_in_speech_bubble:,👁‍🗨
:eye:,👁
:projector:,📽
:om_symbol:,🕉
:dove:,🕊
:candle:,🕯
:clock:,🕰
:hole:,🕳
:dark_sunglasses:,🕶
:spider:,🕷
:spider_web:,🕸
:joystick:,🕹
:paperclips:,🖇
:pen_ballpoint:,🖊
:pen_fountain:,🖋
:paintbrush:,🖌
:crayon:,🖍
:desktop:,🖥
:printer:,🖨
:mouse_three_button:,🖱
:trackball:,🖲
:frame_photo:,🖼
:dividers:,🗂
:card_box:,🗃
:file_cabinet:,🗄
:wastebasket:,🗑
:notepad_spiral:,🗒
:calendar_spiral:,🗓
:compression:,🗜
:key2:,🗝
:newspaper2:,🗞
:dagger:,🗡
:speaking_head:,🗣
:speech_left:,🗨
:anger_right:,🗯
:ballot_box:,🗳
:map:,🗺
:couch:,🛋
:shopping_bags:,🛍
:bellhop:,🛎
:bed:,🛏
:tools:,🛠
:shield:,🛡
:oil:,🛢
:motorway:,🛣
:railway_track:,🛤
:motorboat:,🛥
:airplane_small:,🛩
:satellite_orbital:,🛰
:cruise_ship:,🛳
:bangbang:,‼
:interrobang:,⁉
:information_source:,
:left_right_arrow:,↔
:arrow_up_down:,↕
:arrow_upper_left:,↖
:arrow_upper_right:,↗
:arrow_lower_right:,↘
:arrow_lower_left:,↙
:leftwards_arrow_with_hook:,↩
:arrow_right_hook:,↪
:hash:,#⃣
:keyboard:,⌨
:eject:,⏏
:track_next:,⏭
:track_previous:,⏮
:play_pause:,⏯
:stopwatch:,⏱
:timer:,⏲
:pause_button:,⏸
:stop_button:,⏹
:record_button:,⏺
:m:,Ⓜ
:black_small_square:,▪
:white_small_square:,▫
:arrow_forward:,▶
:arrow_backward:,◀
:white_medium_square:,◻
:black_medium_square:,◼
:sunny:,☀
:cloud:,☁
:umbrella2:,☂
:snowman2:,☃
:comet:,☄
:telephone:,☎
:ballot_box_with_check:,☑
:shamrock:,☘
:skull_crossbones:,☠
:radioactive:,☢
:biohazard:,☣
:orthodox_cross:,☦
:star_and_crescent:,☪
:peace:,☮
:yin_yang:,☯
:wheel_of_dharma:,☸
:frowning2:,☹
:relaxed:,☺
:spades:,♠
:clubs:,♣
:hearts:,♥
:diamonds:,♦
:hotsprings:,♨
:recycle:,♻
:hammer_pick:,⚒
:crossed_swords:,⚔
:scales:,⚖
:alembic:,⚗
:gear:,⚙
:atom:,⚛
:fleur_de_lis:,⚜
:warning:,⚠
:coffin:,⚰
:urn:,⚱
:thunder_cloud_rain:,⛈
:pick:,⛏
:helmet_with_cross:,⛑
:chains:,⛓
:shinto_shrine:,⛩
:mountain:,⛰
:beach_umbrella:,⛱
:ferry:,⛴
:skier:,⛷
:ice_skate:,⛸
:scissors:,✂
:airplane:,✈
:envelope:,✉
:pencil2:,✏
:black_nib:,✒
:heavy_check_mark:,✔
:heavy_multiplication_x:,✖
:cross:,✝
:star_of_david:,✡
:eight_spoked_asterisk:,✳
:eight_pointed_black_star:,✴
:snowflake:,❄
:sparkle:,❇
:heart_exclamation:,❣
:heart:,❤
:arrow_right:,➡
:arrow_heading_up:,⤴
:arrow_heading_down:,⤵
:asterisk:,*⃣
:arrow_left:,⬅
:arrow_up:,⬆
:arrow_down:,⬇
:zero:,0⃣
:wavy_dash:,〰
:part_alternation_mark:,〽
:one:,1⃣
:two:,2⃣
:congratulations:,㊗
:secret:,㊙
:three:,3⃣
:four:,4⃣
:five:,5⃣
:six:,6⃣
:seven:,7⃣
:eight:,8⃣
:nine:,9⃣

View file

@ -1 +0,0 @@
module.exports = () => /🅰|🅱|🅾|🅿|🈂|🈷|🌡|🌤|🌥|🌦|🌧|🌨|🌩|🌪|🌫|🌬|🌶|🍽|🎖|🎗|🎙|🎚|🎛|🎞|🎟|🏍|🏎|🏔|🏕|🏖|🏗|🏘|🏙|🏚|🏛|🏜|🏝|🏞|🏟|🏳|🏵|🏷|🐿|👁🗨|👁|📽|🕉|🕊|🕯|🕰|🕳|🕶|🕷|🕸|🕹|🖇|🖊|🖋|🖌|🖍|🖥|🖨|🖱|🖲|🖼|🗂|🗃|🗄|🗑|🗒|🗓|🗜|🗝|🗞|🗡|🗣|🗨|🗯|🗳|🗺|🛋|🛍|🛎|🛏|🛠|🛡|🛢|🛣|🛤|🛥|🛩|🛰|🛳||||||||||||#||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\*||||0|||1|2|||3|4|5|6|7|8|9/g;

View file

@ -1,23 +1,17 @@
import fs from "fs";
export default function (file, message, from, msg, noconsole) {
export default function (file, message, from, msg) {
try {
fs.appendFileSync(
`../pepperbot/logs/${file}`,
`AT: ${Date()}
SCRIPT: ${from}
IN: <#${message.channel.id}>
MESSAGE CONTENT: ${message.content}
ADDITIONAL INFORMATION: ${msg}
\n`
);
if (!noconsole) {
console.log(
`AT: ${Date()}
SCRIPT: ${from}
MESSAGE CONTENT: ${message.content}
ADDITIONAL INFORMATION: ${msg}
`
);
}
} catch (err) {}
}
// TEMPLATE: