This repository was archived by the owner on Oct 9, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 1818import BaseCommand from '#src/core/BaseCommand.js' ;
1919import Context from '#src/core/CommandContext/Context.js' ;
2020import db from '#src/utils/Db.js' ;
21- import { ApplicationCommandOptionType , Invite } from 'discord.js' ;
21+ import { ApplicationCommandOptionType , Invite , PermissionsBitField } from 'discord.js' ;
2222
2323export default class ConfigSetInviteSubcommand extends BaseCommand {
2424 constructor ( ) {
@@ -27,6 +27,7 @@ export default class ConfigSetInviteSubcommand extends BaseCommand {
2727 description :
2828 'Set the invite link for the server. People can use it to join through InterChat leaderboards.' ,
2929 types : { slash : true , prefix : true } ,
30+ defaultPermissions : new PermissionsBitField ( 'ManageMessages' ) ,
3031 options : [
3132 {
3233 type : ApplicationCommandOptionType . String ,
Original file line number Diff line number Diff line change @@ -109,7 +109,6 @@ export async function formatUserLeaderboard(
109109 output += `${ rankDisplay . padEnd ( 2 ) } | ${ username . padEnd ( 18 ) } | ${ score . toString ( ) . padEnd ( 7 ) } \n` ;
110110 }
111111
112- // Wrap the table in a code block for fixed-width font.
113112 return `\`\`\`css\n${ output } \`\`\`` ;
114113}
115114
@@ -140,7 +139,7 @@ export async function formatServerLeaderboard(
140139
141140 // Limit the server name length for table formatting.
142141 const serverName =
143- guild . name . length > 20 ? `${ guild . name . slice ( 0 , 18 ) } ..` : guild . name ;
142+ guild . name . length > 20 ? `${ guild . name . slice ( 0 , 17 ) } . ..` : guild . name ;
144143 const serverData = inviteLinks . find (
145144 ( link ) => link . id === serverId && Boolean ( link . inviteCode ) ,
146145 ) ;
@@ -155,6 +154,5 @@ export async function formatServerLeaderboard(
155154 output += `${ rankDisplay . padEnd ( 2 ) } | ${ serverName . padEnd ( 20 ) } | ${ score . toString ( ) . padEnd ( 3 ) } | ${ invite . padEnd ( 15 ) } \n` ;
156155 }
157156
158- // Wrap the table in a code block for fixed-width font.
159157 return `\`\`\`css\n${ output } \`\`\`` ;
160158}
You can’t perform that action at this time.
0 commit comments