-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RELEASE] - v2.1.0
- Loading branch information
Showing
20 changed files
with
580 additions
and
128 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
name: "Emoji request" | ||
about: "I would like to add a new emoji in the list" | ||
title: '' | ||
labels: question | ||
assignees: '' | ||
--- | ||
|
||
## Emoji request | ||
|
||
**Emoji:** | ||
**Potential ID(s):** |
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,30 +1,63 @@ | ||
## How to contribute to SpookyBot | ||
# How to contribute to SpookyBot | ||
|
||
#### **Did you find a bug?** | ||
## **Did you find a bug?** | ||
|
||
* **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/LucasCtrl/spookyBot/issues). | ||
|
||
* If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/LucasCtrl/spookyBot/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring. | ||
|
||
#### **Did you write a patch that fixes a bug?** | ||
## **Did you write a patch that fixes a bug?** | ||
|
||
* Open a new GitHub pull request with the patch. | ||
|
||
* Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable. | ||
|
||
#### **Did you fix whitespace, format code, or make a purely cosmetic patch?** | ||
## **Did you fix whitespace, format code, or make a purely cosmetic patch?** | ||
|
||
Changes that are cosmetic in nature and do not add anything substantial to the stability, functionality, or testability of the bot will generally not be accepted. | ||
|
||
#### **Do you intend to add a new feature or change an existing one?** | ||
## **Do you intend to add a new feature or change an existing one?** | ||
|
||
* Suggest your change in a [GitHub issue](https://github.com/LucasCtrl/spookyBot/issues) and start writing code. | ||
|
||
#### **Do you have questions about the source code or the bot?** | ||
## **Do you have questions about the source code or the bot?** | ||
|
||
* Ask any question about SpookyBot on our [Discord server](https://discord.gg/nEDcagb). | ||
|
||
|
||
## **Branches naming convention** | ||
|
||
Your branches should be named as follows: | ||
`type/camelCase` | ||
|
||
* **type**: represent the type of your feature, follow the following table | ||
* **camelCase**: your feature title in [camelCase aka dromedaryCase](https://en.wikipedia.org/wiki/Camel_case) (e.g.: `addReactions`, `i18nIntegration`, `us`, `es`) | ||
|
||
If your branch does not follow this naming standard, your PR may be rejected. | ||
|
||
### Branch types | ||
|
||
| Type | Usage | | ||
| ----- | ----- | | ||
| feature | Used when developing a new feature | | ||
| fix | Used to solve a bug | | ||
| translation | Used to translate the robot | | ||
|
||
## **Pull requests/Issues naming convention** | ||
|
||
Your PRs and issues should be named as follows: | ||
`[TYPE] - PR title` | ||
|
||
* **TYPE**: represent the type of your feature, follow the following table | ||
* **PR title**: your PR title | ||
|
||
### PR types | ||
|
||
| Type | Usage | | ||
| ----- | ----- | | ||
| FEATURE | Used when developing a new feature | | ||
| BUG | Used to solve a bug | | ||
| TRANSLATION | Used to translate the robot | | ||
|
||
|
||
Thanks! :heart: :heart: :heart: | ||
|
||
LucasAlt |
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,73 @@ | ||
import { MessageEmbed } from 'discord.js' | ||
import { readdirSync } from 'node:fs' | ||
import { fileURLToPath } from 'node:url' | ||
import { dirname, resolve } from 'node:path' | ||
import { languageCodes as ISOCode } from '../../utils/languageCodes.js' | ||
import { updateGuildConfig } from '../../models/guilds/config.js' | ||
|
||
export default { | ||
command: 'setlang', | ||
aliases: ['lang'], | ||
help: { | ||
name: 'Set language', | ||
description: 'Change bot default language', | ||
}, | ||
|
||
run: async (client, message, args) => { | ||
message.delete() | ||
|
||
let availableLang = [] | ||
let embed | ||
|
||
// -------------------- Get available languages -------------------- | ||
|
||
const __dirname = dirname(fileURLToPath(import.meta.url)) | ||
readdirSync(resolve(__dirname, `../../lang/`)) | ||
.filter((x) => x.endsWith('.js')) | ||
.forEach((file) => { | ||
availableLang.push(file.slice(0, -3)) | ||
}) | ||
|
||
// -------------------- Display help if no language provided -------------------- | ||
if (args.length == 0) { | ||
embed = new MessageEmbed() | ||
.setColor(client.config.colors.primary) | ||
.setAuthor('How to use the command', client.user.avatarURL()) | ||
.setDescription(`\`${client.config.prefix}setlang <lang>\``) | ||
.setFooter('This message will be deleted automatically') | ||
} | ||
|
||
// -------------------- Change language if exist -------------------- | ||
else if (availableLang.find((lang) => lang == args[0])) { | ||
embed = new MessageEmbed() | ||
.setColor(client.config.colors.primary) | ||
.setAuthor('Default language changed', client.user.avatarURL()) | ||
.setDescription(`Language set to: **${args[0]}**`) | ||
.setFooter('This message will be deleted automatically') | ||
|
||
updateGuildConfig(message.guild.id, { lang: args[0] }) | ||
} | ||
|
||
// -------------------- Display help if not exist -------------------- | ||
else { | ||
let messageDescription = [ | ||
'The requested language does not exist, please choose a language from this list: (the bold part)', | ||
] | ||
availableLang.forEach((lang) => | ||
messageDescription.push(`- **${lang}**: ${ISOCode.find((l) => l.code == lang).name}`) | ||
) | ||
|
||
embed = new MessageEmbed() | ||
.setColor(client.config.colors.primary) | ||
.setAuthor('Language not found', client.user.avatarURL()) | ||
.setDescription(messageDescription.join('\n')) | ||
.setFooter( | ||
"If you can't find your language, don't hesitate to contact us by using the command boo!support | This message will be deleted automatically" | ||
) | ||
} | ||
|
||
message.channel.send({ embeds: [embed] }).then((m) => { | ||
setTimeout(() => m.delete(), 20000) | ||
}) | ||
}, | ||
} |
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
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
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,67 @@ | ||
export const emojis = [ | ||
{ | ||
id: 'spookybot', | ||
emoji: '761602615326146590', | ||
words: ['spooky'], | ||
}, | ||
{ | ||
id: 'bat', | ||
emoji: 'π¦', | ||
words: ['bat'], | ||
}, | ||
{ | ||
id: 'bone', | ||
emoji: 'π¦΄', | ||
words: ['bone'], | ||
}, | ||
{ | ||
id: 'brain', | ||
emoji: 'π§ ', | ||
words: ['brain'], | ||
}, | ||
{ | ||
id: 'broom', | ||
emoji: 'π§Ή', | ||
words: ['broom'], | ||
}, | ||
{ | ||
id: 'candy', | ||
emoji: 'π¬', | ||
words: ['candy'], | ||
}, | ||
{ | ||
id: 'ghost', | ||
emoji: 'π»', | ||
words: ['ghost'], | ||
}, | ||
{ | ||
id: 'lollipop', | ||
emoji: 'π', | ||
words: ['lollipop'], | ||
}, | ||
{ | ||
id: 'pumpkin', | ||
emoji: 'π', | ||
words: ['halloween', 'pumpkin'], | ||
}, | ||
{ | ||
id: 'skull', | ||
emoji: 'π', | ||
words: ['skull'], | ||
}, | ||
{ | ||
id: 'vampire', | ||
emoji: 'π§', | ||
words: ['vampire'], | ||
}, | ||
{ | ||
id: 'witch', | ||
emoji: 'π§ββοΈ', | ||
words: ['witch'], | ||
}, | ||
{ | ||
id: 'zombie', | ||
emoji: 'π§ββοΈ', | ||
words: ['zombie'], | ||
}, | ||
] |
Oops, something went wrong.