Merge branch 'master' of https://github.com/PolyMC/bot
This commit is contained in:
commit
78d90e18c9
9 changed files with 274 additions and 917 deletions
24
package.json
24
package.json
|
@ -3,29 +3,27 @@
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "NODE_ENV=development nodemon --ext ts,json --watch src --exec esno src/index.ts",
|
"dev": "NODE_ENV=development tsx watch src/index.ts",
|
||||||
"start": "esno src/index.ts",
|
"start": "tsx src/index.ts",
|
||||||
"lint": "eslint **/*.ts"
|
"lint": "eslint **/*.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@cliqz/adblocker": "^1.23.8",
|
"@cliqz/adblocker": "^1.23.8",
|
||||||
"discord-command-parser": "^1.5.3",
|
"discord-command-parser": "^1.5.3",
|
||||||
"discord.js": "^13.7.0",
|
"discord.js": "^13.8.0",
|
||||||
"dotenv": "^16.0.1",
|
|
||||||
"kleur": "^4.1.4",
|
"kleur": "^4.1.4",
|
||||||
"node-fetch": "^3.2.4",
|
"node-fetch": "^3.2.5",
|
||||||
"remove-markdown": "^0.5.0",
|
"remove-markdown": "^0.5.0",
|
||||||
|
"tsx": "^3.4.2",
|
||||||
"url-regex": "^5.0.0"
|
"url-regex": "^5.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@esbuild-plugins/node-resolve": "^0.1.4",
|
"@types/node": "^17.0.41",
|
||||||
"@types/node": "^17.0.38",
|
"@typescript-eslint/eslint-plugin": "^5.27.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.25.0",
|
"@typescript-eslint/parser": "^5.27.1",
|
||||||
"@typescript-eslint/parser": "^5.25.0",
|
"dotenv": "^16.0.1",
|
||||||
"esbuild": "^0.14.39",
|
"esbuild": "^0.14.43",
|
||||||
"eslint": "^8.16.0",
|
"eslint": "^8.17.0",
|
||||||
"esno": "^0.16.3",
|
|
||||||
"nodemon": "^2.0.16",
|
|
||||||
"prettier": "^2.6.2",
|
"prettier": "^2.6.2",
|
||||||
"typescript": "^4.6.4"
|
"typescript": "^4.6.4"
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,6 @@ export const cmd: Command = {
|
||||||
embed.addField('!' + cmd.name, resp.join('\n'));
|
embed.addField('!' + cmd.name, resp.join('\n'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return e.reply({ embeds: [embed] });
|
await e.reply({ embeds: [embed] });
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const cmd: Command = {
|
||||||
const memes = await e.guild?.members.fetch().then((r) => r.toJSON());
|
const memes = await e.guild?.members.fetch().then((r) => r.toJSON());
|
||||||
if (!memes) return;
|
if (!memes) return;
|
||||||
|
|
||||||
return e.reply({
|
await e.reply({
|
||||||
embeds: [
|
embeds: [
|
||||||
{
|
{
|
||||||
title: `${memes.length} total members!`,
|
title: `${memes.length} total members!`,
|
||||||
|
|
|
@ -5,6 +5,6 @@ export const cmd: Command = {
|
||||||
desc: 'Shows the ping of the bot',
|
desc: 'Shows the ping of the bot',
|
||||||
aliases: ['test'],
|
aliases: ['test'],
|
||||||
exec: async (e) => {
|
exec: async (e) => {
|
||||||
return await e.reply(`${e.client.ws.ping}ms`);
|
await e.reply(`${e.client.ws.ping}ms`);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const cmd: Command = {
|
||||||
const count = await fetch('https://api.github.com/repos/PolyMC/PolyMC')
|
const count = await fetch('https://api.github.com/repos/PolyMC/PolyMC')
|
||||||
.then((r) => r.json() as Promise<{ stargazers_count: number }>)
|
.then((r) => r.json() as Promise<{ stargazers_count: number }>)
|
||||||
.then((j) => j.stargazers_count);
|
.then((j) => j.stargazers_count);
|
||||||
return e.reply({
|
await e.reply({
|
||||||
embeds: [
|
embeds: [
|
||||||
{
|
{
|
||||||
title: `⭐ ${count} total stars!`,
|
title: `⭐ ${count} total stars!`,
|
||||||
|
|
|
@ -22,6 +22,6 @@ export const cmd: Command = {
|
||||||
}
|
}
|
||||||
em.addField(tag.name, text);
|
em.addField(tag.name, text);
|
||||||
}
|
}
|
||||||
return e.reply({ embeds: [em] });
|
await e.reply({ embeds: [em] });
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -25,7 +25,7 @@ export interface Command {
|
||||||
exec(
|
exec(
|
||||||
m: Message,
|
m: Message,
|
||||||
p: SuccessfulParsedMessage<Message<boolean>>
|
p: SuccessfulParsedMessage<Message<boolean>>
|
||||||
): Promise<Message> | Promise<any> | any;
|
): Promise<void> | void;
|
||||||
}
|
}
|
||||||
|
|
||||||
type Commands = Array<Command>;
|
type Commands = Array<Command>;
|
||||||
|
@ -80,7 +80,7 @@ client.once('ready', async () => {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
const POLYMC_GUILD = await client.guilds.fetch(BuildConfig.GUILD_ID);
|
// const POLYMC_GUILD = await client.guilds.fetch(BuildConfig.GUILD_ID);
|
||||||
|
|
||||||
client.on('messageCreate', async (e) => {
|
client.on('messageCreate', async (e) => {
|
||||||
if (!e.content) return;
|
if (!e.content) return;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
"name": "migrate",
|
"name": "migrate",
|
||||||
"text": "https://polymc.org/wiki/getting-started/migrating-multimc/",
|
"text": "https://polymc.org/wiki/getting-started/migrating-multimc/",
|
||||||
"aliases": ["migr", "mmc"]
|
"aliases": ["migr", "mmc", "multimc"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "thematrix",
|
"name": "thematrix",
|
||||||
|
@ -10,12 +10,12 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "log",
|
"name": "log",
|
||||||
"aliases": ["sendlog", "log"],
|
"aliases": ["sendlog", "logs"],
|
||||||
"text": "Please send logs: https://cdn.discordapp.com/attachments/981957331430539267/983680253367058452/1.png https://cdn.discordapp.com/attachments/981957331430539267/983680253715165234/2.png"
|
"text": "Please send logs: https://cdn.discordapp.com/attachments/981957331430539267/983680253367058452/1.png https://cdn.discordapp.com/attachments/981957331430539267/983680253715165234/2.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "optifine",
|
"name": "optifine",
|
||||||
"aliases": ["of", "optimize"],
|
"aliases": ["of", "optimize", "opticrap", "notfine"],
|
||||||
"embed": {
|
"embed": {
|
||||||
"color": "DARK_GREEN",
|
"color": "DARK_GREEN",
|
||||||
"title": "OptiFine",
|
"title": "OptiFine",
|
||||||
|
@ -64,7 +64,13 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "eta",
|
"name": "eta",
|
||||||
"text": "Sometime"
|
"text": "Sometime",
|
||||||
|
"aliases": ["wen", "when"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "why",
|
||||||
|
"text": "https://polymc.org/wiki/overview/faq/#why-did-our-community-choose-to-fork https://polymc.org/news/moving-on/",
|
||||||
|
"aliases": ["whywaspolymcmade", "mmcdrama", "devlauncher"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "curseforge",
|
"name": "curseforge",
|
||||||
|
@ -73,7 +79,7 @@
|
||||||
"description": "CurseForge added a new option to block third party clients like PolyMC from accessing mod files, and they started to enforce this option lately. We can't allow you to download those mods directly from PolyMC, but PolyMC 1.3.1 and higher have a workaround to let modpacks work: letting you to download those opted out mods manually. We highly encourage asking authors that opted out to stop doing so.",
|
"description": "CurseForge added a new option to block third party clients like PolyMC from accessing mod files, and they started to enforce this option lately. We can't allow you to download those mods directly from PolyMC, but PolyMC 1.3.1 and higher have a workaround to let modpacks work: letting you to download those opted out mods manually. We highly encourage asking authors that opted out to stop doing so.",
|
||||||
"color": "ORANGE"
|
"color": "ORANGE"
|
||||||
},
|
},
|
||||||
"aliases": ["cf", "curse", "cursed"]
|
"aliases": ["cf", "curse", "cursed", "cursedfrog"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "piracy",
|
"name": "piracy",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue