Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Wynntils/Wynntils-Bot
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.1.0
Choose a base ref
...
head repository: Wynntils/Wynntils-Bot
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 6,427 additions and 545 deletions.
  1. +5 −0 .dockerignore
  2. +7 −2 .eslintrc
  3. +3 −1 .gitignore
  4. +25 −0 Dockerfile
  5. +45 −45 assets/faq.json
  6. +16 −0 docker-compose.yml
  7. +4,673 −0 package-lock.json
  8. +15 −6 package.json
  9. +81 −0 src/classes/HelpCommand.ts
  10. +76 −0 src/classes/WynntilsCommand.ts
  11. +124 −0 src/commands/BanCommand.ts
  12. +42 −49 src/commands/ConfigCommand.ts
  13. +24 −22 src/commands/FaqCommand.ts
  14. +80 −78 src/commands/InfoCommand.ts
  15. +113 −0 src/commands/KickCommand.ts
  16. +184 −0 src/commands/MuteCommands.ts
  17. +7 −6 src/commands/PingCommand.ts
  18. +45 −57 src/commands/SelfRoleCommand.ts
  19. +223 −0 src/commands/StrikeCommand.ts
  20. +3 −2 src/constants/Channel.ts
  21. +7 −0 src/constants/Colors.ts
  22. +4 −2 src/constants/Emoji.ts
  23. +7 −8 src/constants/Role.ts
  24. +7 −0 src/constants/types/DMOptions.ts
  25. +3 −0 src/events/error.ts
  26. +24 −0 src/events/guildMemberAdd.ts
  27. +23 −0 src/events/guildMemberRemove.ts
  28. +98 −24 src/events/guildMemberUpdate.ts
  29. +21 −17 src/events/{message.ts → messageCreate.ts}
  30. +29 −0 src/events/messageDelete.ts
  31. +33 −34 src/events/messageReactionAdd.ts
  32. +31 −33 src/events/messageReactionRemove.ts
  33. +48 −0 src/events/messageUpdate.ts
  34. +22 −7 src/events/ready.ts
  35. +39 −0 src/events/threadCreate.ts
  36. +36 −0 src/events/threadDelete.ts
  37. +53 −44 src/index.ts
  38. +6 −6 src/interfaces/CachedService.ts
  39. +1 −1 src/interfaces/api/FaqEntry.ts
  40. +0 −2 src/interfaces/api/IllegalModRepostSite.ts
  41. +1 −0 src/interfaces/api/athena/CosmeticInfo.ts
  42. +4 −4 src/interfaces/api/athena/UserInfo.ts
  43. +26 −0 src/models/Punishment.ts
  44. +14 −13 src/services/ConfigService.ts
  45. +9 −9 src/services/FaqService.ts
  46. +12 −12 src/services/StopIllegalModRepostsService.ts
  47. +70 −0 src/utils/functions.ts
  48. +8 −61 tsconfig.json
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*
!assets
!src
!package.json
!tsconfig.json
9 changes: 7 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -20,13 +20,18 @@
"SwitchCase": 1
}
],
"quote-props": [
"error",
"as-needed",
{ "keywords": false }
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
"never"
],
"react/prop-types": 0,
"react/no-unescaped-entities": 0,
@@ -64,7 +69,7 @@
}
],
"space-before-blocks":"error",
"curly": ["error", "all"],
"curly": ["error", "multi-or-nest"],
"brace-style": 2
}
}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -39,6 +39,9 @@ jspm_packages/
# TypeScript v1 declaration files
typings/

# TypeScript incremental compilation cache
*.tsbuildinfo

# Optional npm cache directory
.npm

@@ -63,5 +66,4 @@ dist/
# next.js build output
.next

package-lock.json
.idea
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM node:16 as builder

WORKDIR /home/node/app

COPY package.json ./
COPY tsconfig.json ./
COPY src ./src

RUN npm install

RUN npm run build

FROM node:16 as runner

WORKDIR /home/node/app

COPY package.json ./
COPY assets ./assets

RUN npm install --only=production

COPY --from=builder /home/node/app/dist ./dist

# Start
CMD [ "npm", "run", "prod" ]
90 changes: 45 additions & 45 deletions assets/faq.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
[
{
"name": "sockets",
"title": "Viewing Friend & Party Members through the Map",
"value": "Yes, we're planning to implement it. Yes, it was already in CE for a short while. However, we decided to remove it as a better solution is possible (for both better performance and file size)."
},
{
"name": "guildcolor",
"title": "Custom Territory Colors",
"value": "There are a few requirements for getting a custom territory color.\n\n**Requirements**\n```\n- Your Guild must be at least level 30\n- The color you wish to use MUST be visible, so avoid black or really dark colors.\n- Be the Guild Owner\n```\nIf your guild meets the requirements, then you can request a custom color by going to <#495293364803993610> and creating a support ticket using the `/new` command. Please provide the color in HEX format e.g. #FFFFFF."
},
{
"name": "install",
"title": "Installing Wynntils",
"value": "Here are some guides to help you get started with using the mod.\n\n[Wynncraft Forums](https://forums.wynncraft.com/threads/197716/) or [Wynntils' Install Page](https://wynntils.com/install/).\n\nPlease make sure you're installing the recommended build of Forge 1.12.2 while setting up Wynntils."
},
{
"name": "capes",
"title": "Wynntils Capes",
"value": "In order to upload a cape you'll need to setup a Wynntils account first. You can do so by either going in-game (with Wynntils installed) and using the command `/token`. This will give you a clickable token that will allow you to create your account. You can now log in at [Wynntils Accounts](https://account.wynntils.com/) with your Minecraft username as the username.\n\n*Please note that capes and elytraas have to be uploaded as a 64x32 or 128x64 image.*"
},
{
"name": "highlights",
"title": "Item & Player Highlighting",
"value": "Dropped item and player highlighting will never be implemented in Wynntils as Wynncraft does not allow for such functionality. If you're using any other mod that provides this feature, you do so at the risk of being banned from the server."
},
{
"name": "ban",
"title": "Is Wynntils Allowed on Wynncraft?",
"value": "You won't be banned for using Wynntils. Though, if you get somehow do get banned for using Wynntils, please create an appeal on the [Wynncraft Forums](https://forums.wynncraft.com/) and your appeal will be accepted."
},
{
"name": "support",
"title": "Crash, Bug, and Support",
"value": "To request for support, please ask the community if it is something that can be easily answered by our users, otherwise, please go to <#425293785338085387> and type `-new Support Request`. Upon doing so, a channel will be created for you to submit your inquiry.\n\nTo report a bug or a crash, please go to <#425293785338085387> and type `-new Bug Report` or `-new Crash Report`. Upon doing so, a channel will be created for you to report your bug or crash."
},
{
"name": "download",
"title": "Downloads",
"value": "You can download Wynntils at these following locations:\n**CurseForge** - [Download](https://minecraft.curseforge.com/projects/wynntils)\n**Wynntils (Stable)** - [Download](http://ci.wynntils.com/job/Wynntils/lastSuccessfulBuild/)\n**Wynntils (Cutting Edge)** - [Download](http://ci.wynntils.com/job/Wynntils-DEV/lastSuccessfulBuild/)"
},
{
"name": "streams",
"title": "Release Streams",
"value": "Wynntils has two different release streams:\n\n**Stable**: The mod will only update when a new version is released. Stable versions are generally more stable than Cutting Edge builds.\n\n**Cutting Edge (CE)**: The mod will update whenever a new build is released. Cutting Edge builds will include features that are not yet in Stable versions and are currently in development but may also be less stable than Stable versions.\n\nYou can change your release stream by going into the mod settings (default key: `P`) and look in the Core category."
}
{
"name": "logs",
"title": "Sending logs",
"value": "If you have experienced a bug or if you have crashed, we may ask you to upload your `latest.log` file or a crash report.\n\nYou can find:\n- `latest.log` in your `.minecraft/logs` folder or the `.wynntils/logs` folder if you use Wynntils Mod Installer;\n- `crash reports` in the `.minecraft/crash-reports` folder or the `.wynntils/crash-reports` folder if you use Wynntils Mod Installer.\n## Where do I find `.minecraft` and `.wynntils`?`\n- Windows - `%appdata%\\.minecraft\\` and `%appdata%\\.wynntils\\`\n- MacOS - `~/Library/Application Support/minecraft` and `~/Library/Application Support/wynntils`\n- Linux - `~/.minecraft` and `~/.wynntils`"
},
{
"name": "guildcolor",
"title": "Custom Territory Colors",
"value": "There are a few requirements for getting a custom territory color.\n\n**Requirements**\n```\n- Your Guild must be at least level 30\n- The color you wish to use MUST be visible, so avoid black or really dark colors.\n- Be the Guild Owner\n```\nIf your guild meets the requirements, then you can request a custom color by going to <#521320092747825164> and creating a support ticket by clicking on the green button to request support. Please provide the color in HEX format e.g. #FFFFFF."
},
{
"name": "install",
"title": "Installing Wynntils",
"value": "Wynntils is installed like every other mod for Minecraft. If you have never installed mods for minecraft before, don't worry, we have a solution for you\n\n- **Manual**: Here is a [video tutorial](https://youtu.be/cmotq0OWYqk) by Looni, make sure to set Minecraft version to the supported Wynntils version.\n- **Automated**: We have created Wynntils Mod Installer app which can install and update Wynntils as well as many commonly used mods, not only that but you can customize which mods are downloaded to your liking. You can find it [here](https://github.com/Wynntils/launchy?tab=readme-ov-file#wynntils-mod-installer)"
},
{
"name": "capes",
"title": "Wynntils Capes",
"value": "In order to upload a cape you'll need to setup a Wynntils account first. You can do so by using the `/wynntils token` command in the game. This will give you a clickable token that will allow you to create your account. You can now log in at [Wynntils Accounts](https://account.wynntils.com/) with your Minecraft username as the username.\n\n*Please note that capes and elytras have to be uploaded as a 64x32 or 128x64 image.*"
},
{
"name": "highlights",
"title": "Item & Player Highlighting",
"value": "Dropped item and player highlighting will never be implemented in Wynntils as Wynncraft does not allow for such functionality. If you're using any other mod that provides this feature, you do so at the risk of being banned from the server."
},
{
"name": "ban",
"title": "Is Wynntils Allowed on Wynncraft?",
"value": "You won't be banned for using Wynntils. Though, if you get somehow do get banned for using Wynntils, please create an appeal on the [Wynncraft Forums](https://forums.wynncraft.com/) and your appeal will be accepted."
},
{
"name": "support",
"title": "Crash, Bug, and Support",
"value": "You can ask for help in the <#1023353867158687744> channel, other users will be able to see your question and may answer it. If you want to ask in private, you create a ticket in the <#521320092747825164> channel, tickets can only be seen by you and moderators.\nTo report bugs you can go to the <#1257255311589511189> channel and if you want to make suggestions for the mod go to the <#1257255390551343184> channel"
},
{
"name": "download",
"title": "Downloads",
"value": "You can download Wynntils at these following locations:\n- **Modrinth** - [Download](https://modrinth.com/mod/wynntils)\n- **CurseForge** - [Download](https://minecraft.curseforge.com/projects/wynntils)\n- **GitHub** - [Download](https://github.com/Wynntils/Artemis/releases/latest)"
},
{
"name": "version",
"title": "Wynntils Versions",
"value": "We currently maintain one version of [Wynntils](https://github.com/Wynntils/Artemis/releases/latest) which currently supports Minecraft 1.21 and 1.21.1 and supports Fabric and Neoforge mod loaders."
}
]
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: "3.5"
services:
bot:
container_name: wynntils-bot
restart: always
networks:
- database
build:
context: .
dockerfile: Dockerfile
env_file:
- .env

networks:
database:
name: database
Loading