File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -277,6 +277,7 @@ export class Motd extends Service {
277277 const wordList = motd
278278 . split ( " " )
279279 . filter ( w => w . length <= 22 && ! filter . includes ( w . toLowerCase ( ) ) ) ;
280+ if ( wordList . length === 0 ) return ;
280281 const word = wordList [ ( Math . random ( ) * wordList ?. length ) | 0 ] ;
281282 nick = word . charAt ( 0 ) . toUpperCase ( ) + word . slice ( 1 ) ;
282283 return await this . bot . setNickname ( nick , "Random Motd name" ) ;
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ export default (bot: DiscordBot): void => {
205205 iconURL : user ?. avatarURL ( ) ?? user ?. user . avatarURL ( ) ?? undefined ,
206206 } )
207207 . setFooter ( {
208- text : `${ actionName } ${
208+ text : `${ actionName ?? entry . action } ${
209209 actionName !== entry . targetType + entry . actionType
210210 ? ` (${ entry . targetType } ${ entry . actionType } )`
211211 : ""
You can’t perform that action at this time.
0 commit comments