File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ module.exports = {
1717 toCheck =
1818 message . mentions . users . first ( ) ||
1919 ( await client . users . fetch ( args [ 0 ] , { cache : true } ) ) ;
20+
2021 } catch ( e ) {
2122 if ( e . httpStatus === 404 )
2223 return message . reply ( {
@@ -28,14 +29,17 @@ module.exports = {
2829 } ) ;
2930 }
3031
31- let docs = client . modlogs . get ( toCheck . id ) [ message . guild . id ] ;
32+ let docs = client . modlogs . get ( toCheck . id ) ;
33+
34+ if ( docs ) docs = docs [ message . guild . id ] ;
3235
3336 if ( ! docs || ! docs . length )
3437 return message . reply ( {
35- content : `No modlogs found for \`${ toCheck . tag } \`` ,
38+ content : `No modlogs found for \`${ toCheck . username } \`` ,
3639 allowedMentions : { repliedUser : false } ,
3740 } ) ;
3841
42+
3943 docs = docs . reverse ( ) ;
4044
4145 const modlogsEmbed = new MessageEmbed ( )
You can’t perform that action at this time.
0 commit comments