various fixes all around
This commit is contained in:
parent
19dd95e22c
commit
3dc74d722e
|
@ -1,4 +1,4 @@
|
|||
import { RoleCreateOptions, GuildMember, Interaction, Message, EmbedBuilder, TextChannel, ActionRowBuilder, ButtonBuilder, ButtonStyle, SlashCommandBuilder } from 'discord.js';
|
||||
import { RoleCreateOptions, GuildMember, Interaction, EmbedBuilder, TextChannel, ActionRowBuilder, ButtonBuilder, ButtonStyle, SlashCommandBuilder } from 'discord.js';
|
||||
import { default as parseColor, Color } from 'parse-color';
|
||||
import { isColorRole, COLOR_ROLE_SEPERATOR } from '../lib/assignableRoles';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { CommandInteraction, Guild, GuildMember, Interaction, Role, SlashCommandBuilder } from 'discord.js';
|
||||
import { Guild, GuildMember, Interaction, Role, SlashCommandBuilder } from 'discord.js';
|
||||
import { isColorRole, isPronounRole } from '../lib/assignableRoles';
|
||||
|
||||
async function fetchRoleMembers(role: Role) {
|
||||
|
|
|
@ -52,7 +52,7 @@ module.exports = {
|
|||
let participants: User[] = [member.user];
|
||||
const context = interaction.options.getInteger('context') || 3;
|
||||
|
||||
const duration = 25000;
|
||||
const duration = 25_000;
|
||||
|
||||
const m = await interaction.reply({
|
||||
fetchReply: true,
|
||||
|
@ -109,12 +109,18 @@ module.exports = {
|
|||
try {
|
||||
const collected = await msg.channel.awaitMessages({
|
||||
max: 1,
|
||||
time: 30000,
|
||||
time: 30_000,
|
||||
errors: ['time']
|
||||
});
|
||||
const message = collected.first() as Message;
|
||||
sentence.push(...message.content.split(' '));
|
||||
await message.react(DONE_EMOJI);
|
||||
|
||||
if (sentence.join(' ').length + message.content.length >= 2000) {
|
||||
message.reply('stop that');
|
||||
sentence.push(...randomWord().split(' '));
|
||||
} else {
|
||||
sentence.push(...message.content.split(' '));
|
||||
await message.react(DONE_EMOJI);
|
||||
}
|
||||
} catch (err) {
|
||||
await p.send('Took too long... Surprise... Added...... :)');
|
||||
sentence.push(...randomWord().split(' '));
|
||||
|
|
|
@ -5,26 +5,6 @@ const rand = require('random-seed').create();
|
|||
const imagesEndpoint = 'https://commons.wikimedia.org/w/api.php?action=query&cmlimit=500&cmtitle=Category%3ALiminal_spaces&cmtype=file&list=categorymembers&format=json';
|
||||
const imageEndpoint = 'https://commons.wikimedia.org/w/api.php?action=query&piprop=thumbnail&pithumbsize=200&prop=pageimages&titles={}&format=json';
|
||||
|
||||
const images = [
|
||||
'img1',
|
||||
'img2',
|
||||
'img3',
|
||||
'img4',
|
||||
'img5',
|
||||
'img7',
|
||||
'img8',
|
||||
'img9',
|
||||
'img10',
|
||||
'img11',
|
||||
'img12',
|
||||
'img14',
|
||||
'img15',
|
||||
'img16',
|
||||
'img17',
|
||||
'img19',
|
||||
'img20'
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName('monitor')
|
||||
|
|
Loading…
Reference in New Issue