Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #56 from takejohn/patch/37-dice-representation
Browse files Browse the repository at this point in the history
Patch/37 dice representation
ringo360 authored Mar 4, 2024
2 parents e9a3041 + 3e648bc commit a115f56
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion commands/randomnum.js
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@ module.exports = new SimpleCommand(
min,
max,
count: diceCount,
representation: `${diceCount}D${max - min}`,
representation: `${diceCount}D${range}`,
}),
color: 0x00fa9a,
fields: [
8 changes: 4 additions & 4 deletions common/SimpleCommand.js
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ const { SlashCommandBuilder } = require('discord.js');

/**
* @template {unknown} [T = unknown]
* @template {boolean} [Required = false]
* @template {boolean} [Required = boolean]
*/
class Option {
name;
@@ -56,7 +56,7 @@ class Option {
* オプションの値を取得する。
* @abstract
* @param {ChatInputCommandInteraction} _interaction コマンドのインタラクション
* @returns {Required extends true ? T : T | null}
* @returns {Required extends true ? T : T | undefined}
*/
get(_interaction) {
throw new Error('Not implemented');
@@ -76,7 +76,7 @@ class Option {
*/

/**
* @template {boolean} [Required = false]
* @template {boolean} [Required = boolean]
* @extends {Option<boolean, Required>}
*/
class BooleanOption extends Option {
@@ -106,7 +106,7 @@ class BooleanOption extends Option {
*/

/**
* @template {boolean} [Required = false]
* @template {boolean} [Required = boolean]
* @extends {Option<number, Required>}
*/
class IntegerOption extends Option {

0 comments on commit a115f56

Please sign in to comment.