1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 04:10:59 -05:00

Compare commits

...

2 Commits

Author SHA1 Message Date
AnxietyisReal
373d816f95 Format DOTY in a proper way 2023-09-09 16:54:21 +10:00
AnxietyisReal
9e64380e62 Update SO link 2023-09-09 16:48:55 +10:00
3 changed files with 8 additions and 2 deletions

View File

@ -10,7 +10,7 @@ export default {
{name: '🔹 Creation Date', value: `<t:${Math.round(role.createdTimestamp/1000)}>\n<t:${Math.round(role.createdTimestamp/1000)}:R>`, inline: true}, {name: '🔹 Creation Date', value: `<t:${Math.round(role.createdTimestamp/1000)}>\n<t:${Math.round(role.createdTimestamp/1000)}:R>`, inline: true},
{name: '🔹 Misc', value: `Hoist: \`${role.hoist}\`\nMentionable: \`${role.mentionable}\`\nPosition: \`${role.position}\` from bottom\nMembers: \`${role.members.size}\`\n${role.members.size < 21 ? role.members.map((e:Discord.GuildMember)=>`**${e.user.username}**`).join('\n') || '' : ''}`, inline: true}, {name: '🔹 Misc', value: `Hoist: \`${role.hoist}\`\nMentionable: \`${role.mentionable}\`\nPosition: \`${role.position}\` from bottom\nMembers: \`${role.members.size}\`\n${role.members.size < 21 ? role.members.map((e:Discord.GuildMember)=>`**${e.user.username}**`).join('\n') || '' : ''}`, inline: true},
{name: '🔹 Permissions', value: `${permissions.includes('Administrator') ? ['Administrator'] : permissions.join(', ').replace(/([a-z])([A-Z])/g, '$1 $2') || 'No permissions'}`, inline: true} {name: '🔹 Permissions', value: `${permissions.includes('Administrator') ? ['Administrator'] : permissions.join(', ').replace(/([a-z])([A-Z])/g, '$1 $2') || 'No permissions'}`, inline: true}
)]})// https://stackoverflow.com/questions/15343163/add-a-space-between-two-words - For anonymous programmer, you know who I am talking to. You're welcome... )]})// https://stackoverflow.com/a/15343790 - For anonymous programmer, you know who I am talking to. You're welcome...
}, },
data: new Discord.SlashCommandBuilder() data: new Discord.SlashCommandBuilder()
.setName('roleinfo') .setName('roleinfo')

View File

@ -1,5 +1,6 @@
import Discord from 'discord.js'; import Discord from 'discord.js';
import TClient from '../client.js'; import TClient from '../client.js';
import FormatDOTY from '../helpers/FormatDOTY.js';
/* function ResponseMadeBy(id:string){ <-- Will be enabled once autoresponse suggestion comes in. /* function ResponseMadeBy(id:string){ <-- Will be enabled once autoresponse suggestion comes in.
return `╰ *Response made by <@${id}>*`; return `╰ *Response made by <@${id}>*`;
@ -31,7 +32,7 @@ export default class Response {
`Good grief, is it Monday already? Anyways, morning ${PersonnyMcPerson}..`, `This time I can shout! So here we go! 1..2..3\n*inhales*\nMORNING ${PersonnyMcPerson.toUpperCase()}!`, `Good grief, is it Monday already? Anyways, morning ${PersonnyMcPerson}..`, `This time I can shout! So here we go! 1..2..3\n*inhales*\nMORNING ${PersonnyMcPerson.toUpperCase()}!`,
'Gooooood morning to you!', `Good morning to you! You know what else is good? A segue to our sponsor, breakfast!\nGet started with getting out of the bed and have some breakfast!`, 'Gooooood morning to you!', `Good morning to you! You know what else is good? A segue to our sponsor, breakfast!\nGet started with getting out of the bed and have some breakfast!`,
`## Morning ${PersonnyMcPerson}!`, '### Have a wonderful day ahead of you!', `Here, have some pancakes for breakfast, ${PersonnyMcPerson}`, 'Is it Friday yet? This week is getting boring already!', `## Morning ${PersonnyMcPerson}!`, '### Have a wonderful day ahead of you!', `Here, have some pancakes for breakfast, ${PersonnyMcPerson}`, 'Is it Friday yet? This week is getting boring already!',
`You have reached ${client.moment.utc().dayOfYear().toLocaleString('en-US')}th day of the year, also good morning to you as well!`, 'Good morning! Have a cookie to start your day with. :cookie:', `You have reached ${FormatDOTY(client.moment.utc().dayOfYear())} day of the year, also good morning to you as well!`, 'Good morning! Have a cookie to start your day with. :cookie:',
'https://tenor.com/view/rambo-family-rambo-rise-and-shine-wake-up-gif-22012440' 'https://tenor.com/view/rambo-family-rambo-rise-and-shine-wake-up-gif-22012440'
], ],
afternoon: [ afternoon: [

View File

@ -0,0 +1,5 @@
export default (number:number)=>{
const suffixes = ['th', 'st', 'nd', 'rd'];
const suffix = number % 100;
return number + (suffixes[(suffix - 20) % 10] || suffixes[suffix] || suffixes[0]);
}