mirror of
https://github.com/citra-emu/discord-bot.git
synced 2025-02-28 16:46:54 +00:00
Merge branch 'master' into master
This commit is contained in:
commit
0a6d3d0e3d
2
.github/workflows/nodejs.yml
vendored
2
.github/workflows/nodejs.yml
vendored
|
@ -13,7 +13,7 @@ jobs:
|
|||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [18.x]
|
||||
node-version: [20.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
|
16
package.json
16
package.json
|
@ -8,7 +8,7 @@
|
|||
"analyze": true,
|
||||
"license": "GPL-2.0+",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
"node": ">=20.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"checkenv": "^1.2.2",
|
||||
|
@ -18,22 +18,22 @@
|
|||
"logdna": "^3.5.3",
|
||||
"logdna-winston": "^4.0.1",
|
||||
"string-similarity": "^4.0.4",
|
||||
"typescript": "^5.1.6",
|
||||
"typescript": "^5.2.2",
|
||||
"winston": "^3.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tsconfig/node20": "^20.1.2",
|
||||
"@types/ip": "^1.1.0",
|
||||
"@types/node": "^20.5.3",
|
||||
"@types/node": "^20.6.2",
|
||||
"@types/string-similarity": "^4.0.0",
|
||||
"@types/ws": "^8.5.5",
|
||||
"@typescript-eslint/eslint-plugin": "^6.4.1",
|
||||
"@typescript-eslint/parser": "^6.4.1",
|
||||
"esbuild": "^0.19.2",
|
||||
"eslint": "^8.47.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.7.2",
|
||||
"@typescript-eslint/parser": "^6.7.2",
|
||||
"esbuild": "^0.19.3",
|
||||
"eslint": "^8.49.0",
|
||||
"eslint-config-standard": "^17.1.0",
|
||||
"eslint-plugin-import": "^2.28.1",
|
||||
"eslint-plugin-n": "^16.0.2",
|
||||
"eslint-plugin-n": "^16.1.0",
|
||||
"eslint-plugin-promise": "^6.1.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/>"},
|
||||
"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...`"},
|
||||
"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 (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/>"},
|
||||
"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>"},
|
||||
|
@ -19,15 +19,16 @@
|
|||
"hack": {"reply": "To mod your 3DS, please follow the __3DS hacking guide__: <https://3ds.hacks.guide/> \nYou will need a way to read an SD card on your device, such as a built in reader or an adapter."},
|
||||
"multiplayer": {"reply": "Please refer to our __multiplayer setup guide__: <https://citra-emu.org/help/feature/multiplayer>"},
|
||||
"modding": {"reply": "Please refer to our __game modding guide__: <https://citra-emu.org/help/feature/game-modding>"},
|
||||
"portable": {"reply": "Go to <https://citra-emu.org/download/> and select `Manual download`. Then under **Nightly Build**, click on your operating system's icon to the right of the latest build available to download the build.\nExtract it (.7z can be extracted using Winrar or 7zip) and put it wherever you wish. Inside the extracted `nightly-mingw` folder, create a folder called `user`. This Citra should now store all of its config, save files and such inside of this `user` folder.\nCheck to make sure that this `user` folder is in the same folder that contains `citra-qt(.exe)`\nNow run the `citra-qt` executable found inside of the `mingw` folder."},
|
||||
"portable": {"reply": "Go to <https://citra-emu.org/download/> and select `Manual download`. Then under **Nightly Build**, click on your operating system's icon to the right of the latest build available to download the build.\nExtract it (.7z can be extracted using Winrar or 7zip) and put it wherever you wish. Inside the extracted `nightly` folder, create a folder called `user`. This Citra should now store all of its config, save files and such inside of this `user` folder.\nCheck to make sure that this `user` folder is in the same folder that contains `citra-qt(.exe)`\nNow run the `citra-qt` executable found inside of the `nightly` folder."},
|
||||
"ios": {"reply": "Citra does not have an official iOS version because iOS is a complicated operating system to develop for. We currently do not have any developers with an interest in developing for this platform. There are some iOS forks of Citra, however they are not supported by us."},
|
||||
"piracy": {"reply": "*Citra* is legal, we don't support illegal activities. Dumping your purchased games from your 3DS is legal. Downloading them is not.\n\nRefer 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...`\n\nAlso, please refresh yourself on the <#417321837916192779> you agreed to when you joined this server."},
|
||||
"saves": {"reply": "Download Checkpoint and open it on the 3DS. Select the game you want, click L. If you require extdata too, not all games do, press X then press L.\n\nThese will be dumped to /3ds/Checkpoint/saves then either saves or extdata.\n\nLaunch Citra and make sure your game directory is listed on the main screen so the game shows up there. Right click on the game you want then choose Open Save Data Location or Open Extra Data Location. Make sure to launch the game at least once in Citra to create these folders first. \n\nOnce those have been open, just replace any save files in Citra with the ones dumped from your 3DS.\n<https://github.com/FlagBrew/Checkpoint>\nTo reverse this and put a Citra save on the 3DS, work backwards and use R to restore it."},
|
||||
"states": {"reply": "Citra has two kinds of saves available to users, in-game saves and save states.\n\nIn-game saves are the ones you know from the 3DS. These can be shared between devices and are recommended for general use, as they do not corrupt as easily.\nSave states, on the other hand, save Citra's entire emulation state. This includes Citra's configuration, a game's RNG seed, as well as any faults in the emulation at the time of saving. This makes them very useful as a tool for practicing in-game tricks, or for usage in shiny hunting and other RNG related trigger events. However they're not suitable as replacements for in-game save files as the faults in the emulation state would keep building up until the emulation state is too unstable to load properly. They're also ***non-transferable*** because they are made with one setup and only one."},
|
||||
"states": {"reply": "Save states save the entirety of Citra's emulation state. As a result of this, Citra updates that add new things to serialize in the emulation state will break the loading of existing save states that were created on prior Citra versions. Additionally, saving upon save state created progress will make the emulation state gradually more unstable, since the emulation state never gets to clear out emulation bugs with a proper shut down.\nThis is why in-game save files should be used most of all when saving and loading your progress. Save states should only be used within single gaming sessions, not beyond them.\nLastly, save states cannot be transferred between different Citra installations. They may load, but they'll break the virtual file system."},
|
||||
"folder": {"reply": "When you open the game directory selector, you need to choose the folder your games are in, not the games themselves. Those will auto-populate. The only exception to this are .cia ROM files, which you'll need to install using `File>Install CIA...`"},
|
||||
"eshop": {"reply": "We're aware that the e-shop has closed. However, whether a game is available for purchase has no bearing on the legality of downloading that game. The games are still copyrighted, thus downloading them off of the internet is still piracy."},
|
||||
"usecase": {"reply": "Emulators are for enhancing your bought game beyond what the console can offer. Which means resolution upscaling, mod support, texture packs, texture filters, speed ups, ect.\nMost importantly it's for the preservation of your games when the console will inevitably no longer be available for purchase.\nEmulators are not for people to commit theft online."},
|
||||
"usecase": {"reply": "Emulators are for enhancing your bought game beyond what the console can offer. Which means resolution upscaling, mod support, texture packs, texture filters, speed ups, ect.\nMost importantly it's for the preservation of your games when the console will inevitably no longer be available for purchase.\nEmulators are not for people to commit theft online."},
|
||||
"legacy": {"reply": "Please refer to our __legacy builds guide__ to download any older builds of Citra you may need: <https://citra-emu.org/wiki/citra-legacy-builds/>"},
|
||||
"issue": {"reply": "Please refer to our __GitHub issues page__ to file an issue or a feature request: <https://github.com/citra-emu/citra/issues/new/choose>"},
|
||||
"lenny": { "reply": "( ͡° ͜ʖ ͡°)"},
|
||||
"( ͡° ͜ʖ ͡°)": { "reply": "lenny"},
|
||||
"r1": { "reply": ":beginner: **Rule #1:** \nStay courteous and respectful to others."},
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
"legal": { "reply": "*yuzu* is legal, we don't support illegal activities. Dumping your purchased games and system files from your Switch is legal. Downloading them is not."},
|
||||
"building": { "reply": "Please refer to our building guides.\nWindows: <https://yuzu-emu.org/wiki/building-for-windows> \nLinux: <https://yuzu-emu.org/wiki/building-for-linux>"},
|
||||
"contributing": { "reply": "Contributing to the project is the best way to help the project move forward. If you are a developer, please refer to: \nSwitch reference guides: <https://github.com/yuzu-emu/yuzu/wiki/Switch-Hardware-and-Software> \nSwitch homebrew applications for testing: <https://github.com/yuzu-emu/yuzu/wiki/Switch-Homebrew> \nWiki, dedicated to Switch research: <http://switchbrew.org> \nyuzu contributing tips: <https://github.com/yuzu-emu/yuzu/blob/master/CONTRIBUTING.md>"},
|
||||
"multiplayer": { "reply": "Please refer to our __multiplayer setup guide__: <https://yuzu-emu.org/help/feature/multiplayer/>"},
|
||||
"lenny": { "reply": "( ͡° ͜ʖ ͡°)"},
|
||||
"( ͡° ͜ʖ ͡°)": { "reply": "lenny"},
|
||||
"format": { "reply": "A full description of game formats the yuzu supports and when to use them can be found on our wiki. <https://yuzu-emu.org/wiki/overview-of-switch-game-formats/>"},
|
||||
|
@ -53,5 +54,6 @@
|
|||
"perf": { "reply": "yuzu Android is new and unoptimized. Performance issues, crashes, and graphical issues are to be expected. The current minimum/recommended specs are: \nA Snapdragon 865 SoC or newer. \nAt least 8GB of RAM(12GB for larger games like TOTK) \nA device running Android 11+ \n\nIf you cannot see the yuzu app in the Google Play Store, your device is unsupported."},
|
||||
"ios": { "reply": "yuzu does not have an official iOS version because iOS is a complicated operating system to develop for. We currently do not have any developers with an interest in developing for this platform."},
|
||||
"usecase": {"reply": "Emulators are for enhancing your bought game beyond what the console can offer. Which means resolution upscaling, mod support, texture packs, texture filters, speed ups, ect.\nMost importantly it's for the preservation of your games when the console will inevitably no longer be available for purchase.\nEmulators are not for people to commit theft online."}
|
||||
"issue": {"reply": "Please refer to our __GitHub issues page__ to file an issue or a feature request: <https://github.com/yuzu-emu/yuzu/issues/new/choose>"}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -186,7 +186,7 @@ client.on('messageCreate', async (message) => {
|
|||
|
||||
// Check by the name of the command.
|
||||
const cachedModule = cachedModules[`${cmd.toLowerCase()}`];
|
||||
let quoteResponse = null;
|
||||
let quoteResponse: { reply: string; } | null = null;
|
||||
// Check by the quotes in the configuration.
|
||||
if (!cachedModule) quoteResponse = state.responses.quotes[cmd];
|
||||
if (!cachedModule && !quoteResponse) return; // Not a valid command.
|
||||
|
@ -203,15 +203,22 @@ client.on('messageCreate', async (message) => {
|
|||
}
|
||||
|
||||
logger.info(`${message.author.username} ${message.author} [Channel: ${message.channel}] executed command: ${message.content}`);
|
||||
await message.delete();
|
||||
|
||||
try {
|
||||
if (cachedModule) {
|
||||
await cachedModule.command(message);
|
||||
} else if (cachedModules.quote) {
|
||||
await cachedModules.quote.command(message, quoteResponse?.reply);
|
||||
}
|
||||
} catch (err) { logger.error(err); }
|
||||
const executeModule = async () => {
|
||||
try {
|
||||
if (cachedModule) {
|
||||
await cachedModule.command(message);
|
||||
} else if (cachedModules.quote && quoteResponse) {
|
||||
await cachedModules.quote.command(message, quoteResponse.reply);
|
||||
}
|
||||
} catch (err) { logger.error(err); }
|
||||
};
|
||||
await Promise.all(
|
||||
[
|
||||
state.logChannel?.send(`${message.author.username} ${message.author.id} [Channel: ${message.channel}] executed command: \`${message.content}\``),
|
||||
message.delete(),
|
||||
executeModule()
|
||||
]
|
||||
);
|
||||
} else if (!message.author.bot) {
|
||||
// This is a normal channel message.
|
||||
await Promise.all(
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"extends": "@tsconfig/node20/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"module": "esnext",
|
||||
"module": "node16",
|
||||
"noImplicitAny": true,
|
||||
"strictNullChecks": true,
|
||||
"resolveJsonModule": true,
|
||||
|
|
Loading…
Reference in a new issue