Compare commits
10 Commits
659a323a60
...
dcf8b0efbe
Author | SHA1 | Date |
---|---|---|
SleepingSnakezzz | dcf8b0efbe | |
liushuyu | 9de48ffe3c | |
liushuyu | 0432fbe881 | |
liushuyu | aa54213734 | |
TGP17 | 904c196a18 | |
liushuyu | 04ef587bc9 | |
liushuyu | 1e191894ca | |
liushuyu | 72639ee6ed | |
liushuyu | e3c51adf20 | |
TGP17 | 35a3204866 |
26
package.json
26
package.json
|
@ -12,27 +12,27 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"checkenv": "^1.2.2",
|
"checkenv": "^1.2.2",
|
||||||
"discord.js": "^14.13.0",
|
"discord.js": "^14.14.1",
|
||||||
"ip": "^1.1.8",
|
"ip": "^1.1.8",
|
||||||
"logdna": "^3.5.3",
|
"logdna": "^3.5.3",
|
||||||
"logdna-winston": "^4.0.1",
|
"logdna-winston": "^4.0.1",
|
||||||
"string-similarity": "^4.0.4",
|
"string-similarity": "^4.0.4",
|
||||||
"typescript": "^5.2.2",
|
"typescript": "^5.3.2",
|
||||||
"winston": "^3.10.0"
|
"winston": "^3.11.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tsconfig/node20": "^20.1.2",
|
"@tsconfig/node20": "^20.1.2",
|
||||||
"@types/ip": "^1.1.0",
|
"@types/ip": "^1.1.3",
|
||||||
"@types/node": "^20.5.9",
|
"@types/node": "^20.10.0",
|
||||||
"@types/string-similarity": "^4.0.0",
|
"@types/string-similarity": "^4.0.2",
|
||||||
"@types/ws": "^8.5.5",
|
"@types/ws": "^8.5.10",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.5.0",
|
"@typescript-eslint/eslint-plugin": "^6.13.1",
|
||||||
"@typescript-eslint/parser": "^6.5.0",
|
"@typescript-eslint/parser": "^6.13.1",
|
||||||
"esbuild": "^0.19.2",
|
"esbuild": "^0.19.8",
|
||||||
"eslint": "^8.48.0",
|
"eslint": "^8.54.0",
|
||||||
"eslint-config-standard": "^17.1.0",
|
"eslint-config-standard": "^17.1.0",
|
||||||
"eslint-plugin-import": "^2.28.1",
|
"eslint-plugin-import": "^2.29.0",
|
||||||
"eslint-plugin-n": "^16.0.2",
|
"eslint-plugin-n": "^16.3.1",
|
||||||
"eslint-plugin-promise": "^6.1.1",
|
"eslint-plugin-promise": "^6.1.1",
|
||||||
"ts-node": "^10.9.1"
|
"ts-node": "^10.9.1"
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"requirements": { "reply": "Please refer to our **Frequently Asked Questions**. The only requirements for Citra are a GPU that supports at least OpenGL 4.3 and a 64-bit OS, but you definitely want a processor with the highest possible performance per core. <https://citra-emu.org/wiki/faq/>"},
|
"requirements": { "reply": "Please refer to our **Frequently Asked Questions**. The only requirements for Citra are a GPU that supports at least OpenGL 4.3 and a 64-bit OS, but you definitely want a processor with the highest possible performance per core. <https://citra-emu.org/wiki/faq/>"},
|
||||||
"roms": { "reply": "Please read our __community rules__. Warez/downloading games talk is strictly prohibited. To prevent legal issues, you are not allowed to post links or refer to any kind of ROM, NAND, ISO, game, or other copyrighted material that has been illegally obtained or shared. <https://citra-emu.org/rules/>"},
|
"roms": { "reply": "Please read our __community rules__. Warez/downloading games talk is strictly prohibited. To prevent legal issues, you are not allowed to post links or refer to any kind of ROM, NAND, ISO, game, or other copyrighted material that has been illegally obtained or shared. <https://citra-emu.org/rules/>"},
|
||||||
"dump-game": { "reply": "Please refer to our __game dumping guides__. \nFor Cartridges: <https://citra-emu.org/wiki/dumping-game-cartridges/> \nFor Installed Titles: <https://citra-emu.org/wiki/dumping-installed-titles/> \nTo dump DLC and Updates, use this guide <https://citra-emu.org/wiki/dumping-updates-and-dlcs/> and install the results through `File -> Install CIA...`"},
|
"dump-game": { "reply": "Please refer to our __game dumping guides__. \nFor Cartridges: <https://citra-emu.org/wiki/dumping-game-cartridges/> \nFor Installed Titles: <https://citra-emu.org/wiki/dumping-installed-titles/> \nTo dump DLC and Updates, use this guide <https://citra-emu.org/wiki/dumping-updates-and-dlcs/> and install the results through `File -> Install CIA...`"},
|
||||||
"apk": { "reply": "Official Citra for Android has been released! Download the .apk from <https://github.com/citra-emu/citra-nightly/releases>. \nIf you have the Citra Android app from the Google Play Store installed, please uninstall it before installing from our Nightly repo. Your save data will transfer over and if you have paid for Citra Premium, that will transfer over too. \n\nPlease note that the current app is a beta version and not everything works right away. We will continue to fix issues/bugs and release updates."},
|
"apk": { "reply": "Official Citra for Android has been released! Download the .apk.zip (the second `citra-android-universal` link) from <https://github.com/citra-emu/citra-nightly/releases>. \nIf you have the Citra Android app from the Google Play Store installed, please uninstall it before installing from our Nightly repo. Your save data will transfer over and if you have paid for Citra Premium, that will transfer over too. \n\nPlease note that the current app is a beta version and not everything works right away. We will continue to fix issues/bugs and release updates."},
|
||||||
"dump-system": { "reply": "Please refer to our __system dumping guide__: <https://citra-emu.org/wiki/dumping-system-archives-and-the-shared-fonts-from-a-3ds-console/>"},
|
"dump-system": { "reply": "Please refer to our __system dumping guide__: <https://citra-emu.org/wiki/dumping-system-archives-and-the-shared-fonts-from-a-3ds-console/>"},
|
||||||
"compat": { "reply": "Click here to view our game compatibility list: <https://citra-emu.org/game/>. ***A Reminder***: Compatibility ratings are user submitted data and may not accurately reflect the game's playability. Your experience may or may not be the same due to differences in hardware or software environments."},
|
"compat": { "reply": "Click here to view our game compatibility list: <https://citra-emu.org/game/>. ***A Reminder***: Compatibility ratings are user submitted data and may not accurately reflect the game's playability. Your experience may or may not be the same due to differences in hardware or software environments."},
|
||||||
"updates": { "reply": "You can check our latest updates on *Github*. <https://github.com/citra-emu/citra/pulse>"},
|
"updates": { "reply": "You can check our latest updates on *Github*. <https://github.com/citra-emu/citra/pulse>"},
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
"scam": { "reply": "If you believe that a user is attempting to scam you or others, please report them to discord trust and safety and promptly block them. \nTo report the user, please follow this link <https://dis.gd/request>. \nFor more information about how to report them, please look here: <https://support.discord.com/hc/en-us/articles/360000291932-How-to-Properly-Report-Issues-to-Trust-Safety>. \nFinally, if this is the only server you share, please report the user (including screenshots of the conversation) to our moderation team, so that we can address the issue."},
|
"scam": { "reply": "If you believe that a user is attempting to scam you or others, please report them to discord trust and safety and promptly block them. \nTo report the user, please follow this link <https://dis.gd/request>. \nFor more information about how to report them, please look here: <https://support.discord.com/hc/en-us/articles/360000291932-How-to-Properly-Report-Issues-to-Trust-Safety>. \nFinally, if this is the only server you share, please report the user (including screenshots of the conversation) to our moderation team, so that we can address the issue."},
|
||||||
"r1": { "reply": ":beginner: **Rule #1:** \nStay courteous and respectful to others."},
|
"r1": { "reply": ":beginner: **Rule #1:** \nStay courteous and respectful to others."},
|
||||||
"r2": { "reply": ":beginner: **Rule #2:** \nPiracy is prohibited — Talking about warez/downloading games is prohibited. This includes asking for system files, ROMs, encryption keys, shader caches, and discussion of leaked games etc."},
|
"r2": { "reply": ":beginner: **Rule #2:** \nPiracy is prohibited — Talking about warez/downloading games is prohibited. This includes asking for system files, ROMs, encryption keys, shader caches, and discussion of leaked games etc."},
|
||||||
"r3": { "reply": ":beginner: **Rule #3:** \nDiscussion of leaked games is strictly prohibited — No discussion of leaked games is allowed, unless referring to the content of the game. This should only be discussed with spoiler tags."},
|
"r3": { "reply": ":beginner: **Rule #3:** \nDiscussion of leaked information/content is strictly prohibited - no discussion of leaked games is allowed, unless it's about officially released information from the game's developers. Even that should only be discussed while using spoiler tags until the game is officially released."},
|
||||||
"r4": { "reply": ":beginner: **Rule #4:** \nDo not link or discuss unofficial builds — yuzu does not provide support for unofficial builds. They may introduce new bugs, contain GPL violations, or may even contain a virus."},
|
"r4": { "reply": ":beginner: **Rule #4:** \nDo not link or discuss unofficial builds — yuzu does not provide support for unofficial builds. They may introduce new bugs, contain GPL violations, or may even contain a virus."},
|
||||||
"r5": { "reply": ":beginner: **Rule #5:** \nPatreon build support is only provided for Patrons — Patreon build support must be conducted in the patreon exclusive channels, and users should not provide support for leaked builds."},
|
"r5": { "reply": ":beginner: **Rule #5:** \nPatreon build support is only provided for Patrons — Patreon build support must be conducted in the patreon exclusive channels, and users should not provide support for leaked builds."},
|
||||||
"r6": { "reply": ":beginner: **Rule #6:** \nNo Religious or Political discussions."},
|
"r6": { "reply": ":beginner: **Rule #6:** \nNo Religious or Political discussions."},
|
||||||
|
|
|
@ -186,7 +186,7 @@ client.on('messageCreate', async (message) => {
|
||||||
|
|
||||||
// Check by the name of the command.
|
// Check by the name of the command.
|
||||||
const cachedModule = cachedModules[`${cmd.toLowerCase()}`];
|
const cachedModule = cachedModules[`${cmd.toLowerCase()}`];
|
||||||
let quoteResponse = null;
|
let quoteResponse: { reply: string; } | null = null;
|
||||||
// Check by the quotes in the configuration.
|
// Check by the quotes in the configuration.
|
||||||
if (!cachedModule) quoteResponse = state.responses.quotes[cmd];
|
if (!cachedModule) quoteResponse = state.responses.quotes[cmd];
|
||||||
if (!cachedModule && !quoteResponse) return; // Not a valid command.
|
if (!cachedModule && !quoteResponse) return; // Not a valid command.
|
||||||
|
@ -203,15 +203,29 @@ client.on('messageCreate', async (message) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.info(`${message.author.username} ${message.author} [Channel: ${message.channel}] executed command: ${message.content}`);
|
logger.info(`${message.author.username} ${message.author} [Channel: ${message.channel}] executed command: ${message.content}`);
|
||||||
await message.delete();
|
const executeModule = async () => {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (cachedModule) {
|
if (cachedModule) {
|
||||||
await cachedModule.command(message);
|
await cachedModule.command(message);
|
||||||
} else if (cachedModules.quote) {
|
} else if (cachedModules.quote && quoteResponse) {
|
||||||
await cachedModules.quote.command(message, quoteResponse?.reply);
|
await cachedModules.quote.command(message, quoteResponse.reply);
|
||||||
}
|
}
|
||||||
} catch (err) { logger.error(err); }
|
} catch (err) { logger.error(err); }
|
||||||
|
};
|
||||||
|
const commandUsageEmbed = new discord.EmbedBuilder()
|
||||||
|
.setAuthor({ name: message.author.username, iconURL: message.author.displayAvatarURL() })
|
||||||
|
.setDescription(`Command used in ${message.channel.toString()} [Jump To Message](${message.url})`)
|
||||||
|
.addFields({ name: 'Command', value: `\`\`\`\n${message.content}\n\`\`\``, inline: false })
|
||||||
|
.setTimestamp()
|
||||||
|
.setColor('Blue');
|
||||||
|
const userInfo = `\`${message.author?.toString()}\` (${message.author?.username})`;
|
||||||
|
await Promise.all(
|
||||||
|
[
|
||||||
|
state.msglogChannel?.send({ content: userInfo, embeds: [commandUsageEmbed] }),
|
||||||
|
message.delete(),
|
||||||
|
executeModule()
|
||||||
|
]
|
||||||
|
);
|
||||||
} else if (!message.author.bot) {
|
} else if (!message.author.bot) {
|
||||||
// This is a normal channel message.
|
// This is a normal channel message.
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
|
|
Loading…
Reference in New Issue