set default roll to 1d20
This commit is contained in:
parent
6153f98c22
commit
1b209c9214
19
README.md
Normal file
19
README.md
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
# Meridian Bot
|
||||||
|
|
||||||
|
This is a custom discord bot for the Meridian Corp community. Join us @ https://discord.gg/7YrtpSQvca.
|
||||||
|
The bot is auto-hosted on a physical machine at
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Rolling a or some dice(s) (hell yeah)
|
||||||
|
- Dofus Almanax offer
|
||||||
|
|
||||||
|
## Future Features
|
||||||
|
|
||||||
|
- Game mod file handling
|
||||||
|
- Audio Player
|
||||||
|
|
||||||
|
## Authors
|
||||||
|
|
||||||
|
- Yannis P https://git.meridian-corp.org/veko / veko@meridian-corp.org
|
||||||
|
- Martin G https://git.meridian-corp.org/obsidian / obsidian@meridian-corp.org
|
||||||
|
|
@ -8,13 +8,12 @@ module.exports = {
|
||||||
.addStringOption(option =>
|
.addStringOption(option =>
|
||||||
option
|
option
|
||||||
.setName('jet')
|
.setName('jet')
|
||||||
.setDescription('Jet du dé (par ex: 2d6)')
|
.setDescription('Jet du dé (par ex: 2d6, par défaut 1d20)')),
|
||||||
.setRequired(true)),
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
await interaction.deferReply();
|
await interaction.deferReply();
|
||||||
|
|
||||||
// dice argument
|
// dice argument
|
||||||
let jet = interaction.options.getString('jet');
|
let jet = interaction.options.getString('jet') ?? '1d20';
|
||||||
|
|
||||||
// REGEX FORMAT DICE RULE (i.e. 4d6, 10d12, 9d10, 10d5...)
|
// REGEX FORMAT DICE RULE (i.e. 4d6, 10d12, 9d10, 10d5...)
|
||||||
const diceRule = /^\d+d\d+$/;
|
const diceRule = /^\d+d\d+$/;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user