-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5367bcd
commit 6beab1a
Showing
19 changed files
with
750 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,44 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true, | ||
"es6": true | ||
}, | ||
"extends": ["eslint:recommended", "prettier"], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["@typescript-eslint", "prettier"], | ||
"rules": { | ||
// Base rules | ||
"no-undef": ["off"], | ||
"camelcase": ["warn"], | ||
"arrow-spacing": [ | ||
"error", | ||
{ | ||
"before": true, | ||
"after": true | ||
} | ||
], | ||
"no-unused-vars": [ | ||
"warn", | ||
{ | ||
"argsIgnorePattern": "^_", | ||
"vars": "all" | ||
} | ||
], | ||
"no-inner-declarations": "off", | ||
"no-var": "error", | ||
"no-unexpected-multiline": "error", | ||
// Prettier rules | ||
"prettier/prettier": [ | ||
"warn", | ||
{}, | ||
{ | ||
"usePrettierrc": true | ||
} | ||
] | ||
} | ||
"env": { | ||
"browser": true, | ||
"es2021": true, | ||
"es6": true | ||
}, | ||
"extends": ["eslint:recommended", "prettier"], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["@typescript-eslint", "prettier"], | ||
"rules": { | ||
// Base rules | ||
"no-undef": ["off"], | ||
"camelcase": ["warn"], | ||
"arrow-spacing": [ | ||
"error", | ||
{ | ||
"before": true, | ||
"after": true | ||
} | ||
], | ||
"no-unused-vars": [ | ||
"warn", | ||
{ | ||
"argsIgnorePattern": "^_", | ||
"vars": "all" | ||
} | ||
], | ||
"no-inner-declarations": "off", | ||
"no-var": "error", | ||
"no-unexpected-multiline": "error", | ||
// Prettier rules | ||
"prettier/prettier": [ | ||
"warn", | ||
{}, | ||
{ | ||
"usePrettierrc": true | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"arrowParens": "always", | ||
"bracketSpacing": true, | ||
"endOfLine": "lf", | ||
"printWidth": 120, | ||
"semi": true, | ||
"singleQuote": true, | ||
"tabWidth": 4, | ||
"trailingComma": "all", | ||
"useTabs": false | ||
"arrowParens": "always", | ||
"bracketSpacing": true, | ||
"endOfLine": "lf", | ||
"printWidth": 120, | ||
"semi": true, | ||
"singleQuote": true, | ||
"tabWidth": 4, | ||
"trailingComma": "all", | ||
"useTabs": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"files.exclude": { | ||
"**/.git": true, | ||
"**/.svn": true, | ||
"**/.hg": true, | ||
"**/CVS": true, | ||
"**/.DS_Store": true, | ||
"**/Thumbs.db": true, | ||
"**/node_modules": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"command": { | ||
"error": "Oh no! An error occurred. Please try again or contact us through our server.", | ||
"cooldown": "Please wait, you are on a cooldown for `{{commandName}}`. You can use it again <t:{{expiredTimestamp}}:R>." | ||
}, | ||
"help": { | ||
"author": "{{bot_username}} | Help", | ||
"field1": { | ||
"name": "Plans for GVO", | ||
"value": "> We have a lot of plans for **{{bot_username}}** (GVO). These include a variety of modules, such as automatic quotes, channel statistics, welcome & goodbye system, and many more exciting features!" | ||
}, | ||
"field2": { | ||
"name": "Bot Statistics", | ||
"value": "> **Guilds:** `{{guildCount}}`\n> **Users:** `{{userCount}}`" | ||
}, | ||
"field3": { | ||
"name": "Links", | ||
"value": "> [Invite GVO]({{inviteLink}}) and [Join our Support Server]({{discordLink}})\n> Don't forget to visit our [Ko-fi Page]({{kofiLink}}) for more!" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,60 @@ | ||
{ | ||
"name": "gvo-bot", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "/dist/index.js", | ||
"type": "module", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"homepage": "https://gvobot.app", | ||
"bugs": { | ||
"url": "https://github.com/gvobot/bot/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/gvobot/bot" | ||
}, | ||
"keywords": [ | ||
"goodvibesonly", | ||
"good-vibes-only", | ||
"discord-bot", | ||
"discordjs", | ||
"discord-js", | ||
"discord" | ||
], | ||
"author": "duckodas", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@types/i18next": "^13.0.0", | ||
"@types/i18next-node-fs-backend": "^2.1.2", | ||
"@types/node": "^20.4.8", | ||
"@typescript-eslint/eslint-plugin": "^6.3.0", | ||
"@typescript-eslint/parser": "^6.3.0", | ||
"eslint": "^8.46.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-import": "^2.28.0", | ||
"eslint-plugin-prettier": "^5.0.0", | ||
"prettier": "^3.0.1", | ||
"prisma": "^5.1.1", | ||
"typescript": "^5.1.6" | ||
}, | ||
"dependencies": { | ||
"@prisma/client": "^5.1.1", | ||
"discord-hybrid-sharding": "^2.1.3", | ||
"discord.js": "^14.12.1", | ||
"dotenv": "^16.3.1", | ||
"i18next": "^23.4.2", | ||
"i18next-node-fs-backend": "^2.1.3", | ||
"node-cron": "^3.0.2", | ||
"node-fetch": "^3.3.2", | ||
"sappquotes": "^3.0.1" | ||
} | ||
"name": "gvo-bot", | ||
"version": "1.0.0", | ||
"description": "GVO comes with enjoyment. It takes the best parts of discord tools and adds its own version.", | ||
"main": "dist/sharding.js", | ||
"type": "module", | ||
"scripts": { | ||
"start": "node dist/sharding.js", | ||
"build": "npx tsc", | ||
"dev": "npx tsc && node dist/sharding.js", | ||
"watch": "npx tsc -w", | ||
"lint": "eslint '*/**/*.{js,ts,tsx}' --quiet --fix", | ||
"format": "prettier --write '*/**/*.{js,jsx,ts,tsx}'", | ||
"typesafe-i18n": "typesafe-i18n" | ||
}, | ||
"homepage": "https://gvobot.app", | ||
"bugs": { | ||
"url": "https://github.com/gvobot/bot/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/gvobot/bot" | ||
}, | ||
"keywords": [ | ||
"goodvibesonly", | ||
"good-vibes-only", | ||
"discord-bot", | ||
"discordjs", | ||
"discord-js", | ||
"discord" | ||
], | ||
"author": "duckodas", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@types/i18next": "^13.0.0", | ||
"@types/i18next-node-fs-backend": "^2.1.2", | ||
"@types/node": "^20.4.8", | ||
"@typescript-eslint/eslint-plugin": "^6.3.0", | ||
"@typescript-eslint/parser": "^6.3.0", | ||
"eslint": "^8.46.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-import": "^2.28.0", | ||
"eslint-plugin-prettier": "^5.0.0", | ||
"prettier": "^3.0.1", | ||
"prisma": "^5.1.1", | ||
"typescript": "^5.1.6" | ||
}, | ||
"dependencies": { | ||
"@prisma/client": "^5.1.1", | ||
"discord-hybrid-sharding": "^2.1.3", | ||
"discord.js": "^14.12.1", | ||
"dotenv": "^16.3.1", | ||
"i18next": "^23.4.2", | ||
"i18next-node-fs-backend": "^2.1.3", | ||
"node-cron": "^3.0.2", | ||
"node-fetch": "^3.3.2", | ||
"sappquotes": "^3.0.1", | ||
"winston": "^3.10.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
generator client { | ||
provider = "prisma-client-js" | ||
} | ||
|
||
datasource db { | ||
provider = "mongodb" | ||
url = env("DATABASE_URL") | ||
} | ||
|
||
model Guild { | ||
id String @id @map("_id") | ||
language String @default("en-US") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { DiscordClient } from '../../main.js'; | ||
import { CommandInterface } from '../../types/index'; | ||
import { ChatInputCommandInteraction, EmbedBuilder, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js'; | ||
import { getGuilds, getUsers } from '../../helpers/discord.js'; | ||
import { t } from '../../helpers/i18n.js'; | ||
|
||
const command: CommandInterface = { | ||
data: new SlashCommandBuilder() | ||
.setName('help') | ||
.setNSFW(false) | ||
.setDescription('Get information about our bot') | ||
.setDefaultMemberPermissions(PermissionFlagsBits.SendMessages) | ||
.setDMPermission(false), | ||
execute: async (interaction: ChatInputCommandInteraction, client: DiscordClient) => { | ||
const Embed = new EmbedBuilder() | ||
.setAuthor({ | ||
name: t('help.author', { bot_username: client.user?.username }), | ||
iconURL: client.user?.displayAvatarURL(), | ||
}) | ||
.setColor(client.config.colors.theme) | ||
.addFields( | ||
{ | ||
name: t('help.field1.name'), | ||
value: t('help.field1.value', { bot_username: client.user?.username }), | ||
}, | ||
{ | ||
name: t('help.field2.name'), | ||
value: t('help.field2.value', { | ||
guildCount: await getGuilds(client), | ||
userCount: await getUsers(client), | ||
}), | ||
}, | ||
{ | ||
name: t('help.field3.name'), | ||
value: t('help.field3.value', { | ||
inviteLink: client.config.bot.invite, | ||
discordLink: client.config.bot.discord, | ||
kofiLink: client.config.links.kofi, | ||
}), | ||
}, | ||
) | ||
.setFooter({ text: `Support my work by donating @ ko-fi.com/DuckoDas` }); | ||
|
||
interaction.reply({ embeds: [Embed] }); | ||
}, | ||
}; | ||
export default command; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { ConfigInterface } from './types/index'; | ||
import { ColorResolvable } from 'discord.js'; | ||
import 'dotenv/config'; | ||
|
||
export const config: ConfigInterface = { | ||
bot: { | ||
token: `${process.env.DISCORD_TOKEN}`, | ||
invite: 'https://gvobot.app/invite', | ||
discord: 'https://gvobot.app/discord', | ||
}, | ||
links: { | ||
website: 'https://gvobot.app/', | ||
kofi: 'https://gvobot.app/kofi', | ||
github: 'https://gvobot.app/github', | ||
blog: 'https://gvobot.app/blog', | ||
}, | ||
guilds: [ | ||
{ name: "Good Vibes Only - Test Server", id: '1113542893840367687' }, | ||
{ name: 'Good Vibes Only', id: '1126979648249659422' }, | ||
], | ||
colors: { | ||
theme: '#fee300' as ColorResolvable, | ||
green: '#00E09E' as ColorResolvable, | ||
red: '#FF434E' as ColorResolvable, | ||
}, | ||
emojis: { | ||
success: '😊', | ||
error: '😥', | ||
}, | ||
}; |
Oops, something went wrong.