aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-11-28 17:22:49 +0100
committerMinteck <contact@minteck.org>2022-11-28 17:22:49 +0100
commit006ed0f2b6ba65f691551c18138bb38a1bef44b6 (patch)
tree9218625a3ce812e928489623b0673fdf1c964b7f
parentaf9b870d6fae7af96fc5ecb7e6e595cdbe167b51 (diff)
downloadcooler-pony-mane.tar.gz
cooler-pony-mane.tar.bz2
cooler-pony-mane.zip
UpdateHEADmane
-rw-r--r--.DS_Storebin6148 -> 0 bytes
-rw-r--r--.idea/deployment.xml18
-rw-r--r--assets/questions.json2
-rw-r--r--commands/about.ts6
-rw-r--r--commands/restart.ts37
-rw-r--r--core/Welcome.ts4
-rw-r--r--package.json2
7 files changed, 63 insertions, 6 deletions
diff --git a/.DS_Store b/.DS_Store
deleted file mode 100644
index ff230cc..0000000
--- a/.DS_Store
+++ /dev/null
Binary files differ
diff --git a/.idea/deployment.xml b/.idea/deployment.xml
new file mode 100644
index 0000000..c9c916f
--- /dev/null
+++ b/.idea/deployment.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="PublishConfigData" serverName="Minteck.org" remoteFilesAllowedToDisappearOnAutoupload="false">
+ <serverData>
+ <paths name="Minteck.org">
+ <serverdata>
+ <mappings>
+ <mapping deploy="/mnt/applebloom" local="$PROJECT_DIR$/build" web="/" />
+ </mappings>
+ <excludedPaths>
+ <excludedPath local="true" path="$PROJECT_DIR$/build/logs" />
+ <excludedPath local="true" path="$PROJECT_DIR$/build/data" />
+ </excludedPaths>
+ </serverdata>
+ </paths>
+ </serverData>
+ </component>
+</project> \ No newline at end of file
diff --git a/assets/questions.json b/assets/questions.json
index 103a7f2..a3ee3d2 100644
--- a/assets/questions.json
+++ b/assets/questions.json
@@ -21,7 +21,7 @@
},
{
"question": "Is spam or shitposting allowed?",
- "response": ["No", "False", "Not at all", "It is not", "Not allowed", "It is not allowed"]
+ "response": ["No", "False", "Not at all", "It is not", "Not allowed", "It is not allowed", "No, shitposting and spam isn't allowed", "No, shitposting and spam is not allowed", "No, shitposting or spam isn't allowed", "No, shitposting or spam is not allowed"]
},
{
"question": "Is advertising in any kind allowed?",
diff --git a/commands/about.ts b/commands/about.ts
index 96ba94a..01c826c 100644
--- a/commands/about.ts
+++ b/commands/about.ts
@@ -43,15 +43,15 @@ export class AboutCommand extends CommandBase {
new MessageButton()
.setLabel('Source Code')
.setStyle('LINK')
- .setURL("https://git.equestria.dev/equestria.dev/dj-pon-3"),
+ .setURL("https://git.equestria.dev/equestria.dev/cooler-pony"),
new MessageButton()
.setLabel('Roadmap')
.setStyle('LINK')
- .setURL("https://git.equestria.dev/equestria.dev/dj-pon-3/src/branch/mane/TODO.md"),
+ .setURL("https://git.equestria.dev/equestria.dev/cooler-pony/src/branch/mane/TODO.md"),
new MessageButton()
.setLabel('General Information')
.setStyle('LINK')
- .setURL("https://git.equestria.dev/equestria.dev/dj-pon-3/src/branch/mane/README.md"),
+ .setURL("https://git.equestria.dev/equestria.dev/cooler-pony/src/branch/mane/README.md"),
)
]
}).then(() => {
diff --git a/commands/restart.ts b/commands/restart.ts
new file mode 100644
index 0000000..0f4bcfd
--- /dev/null
+++ b/commands/restart.ts
@@ -0,0 +1,37 @@
+import {CommandBase} from "../core/CommandBase";
+import {SlashCommandBuilder} from "@discordjs/builders";
+import * as fs from 'fs';
+import {CommandAction} from "../core/CommandAction";
+import {MessageEmbed} from "discord.js";
+
+export class RestartCommand extends CommandBase {
+ constructor() {
+ super();
+ this.slashCommandData = new SlashCommandBuilder()
+ .setName("restart")
+ .setDescription("Restarts the bot")
+ }
+
+ public handle(action: CommandAction) {
+ let interaction = action.getInteraction();
+
+ if (!interaction.memberPermissions.has("ADMINISTRATOR")) {
+ interaction.reply({
+ embeds: [
+ new MessageEmbed()
+ .setDescription(":x: You need to have the server administrator permission.")
+ ]
+ });
+ return;
+ }
+
+ interaction.reply({
+ embeds: [
+ new MessageEmbed()
+ .setDescription(":white_check_mark: The bot is now restarting")
+ ]
+ }).then(() => {
+ fs.writeFileSync("./RESTART-FORCE", "");
+ });
+ }
+}
diff --git a/core/Welcome.ts b/core/Welcome.ts
index 1a5e7c1..4054131 100644
--- a/core/Welcome.ts
+++ b/core/Welcome.ts
@@ -10,7 +10,9 @@ export class Welcome {
LogManager.warn(member.user.tag + " joined the server");
let guild = member.guild;
- guild.channels.create("welcome").then(channel => {
+ guild.channels.create("welcome", {
+ parent: guild.channels.resolve("996412407217926224").parent.id
+ }).then(channel => {
let thisChannel = {
channel: channel.id,
user: member.user.id,
diff --git a/package.json b/package.json
index 346ad40..af1b107 100644
--- a/package.json
+++ b/package.json
@@ -5,7 +5,7 @@
"main": "./build/index.js",
"scripts": {
"start": "cd ./build && node ./index.js",
- "build": "tsc -p tsconfig.json && cp -r assets build"
+ "build": "tsc -p tsconfig.json && cp -r assets build && cp -r node_modules build"
},
"author": "Minteck",
"license": "MIT",