File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ const comfyDiscord = {
71
71
if ( ! client ) {
72
72
return false ;
73
73
}
74
- const discordChannel = client . channels . find ( ch => ch . name === channel ) ;
74
+ const discordChannel = client . channels . cache . find ( ch => ch . name === channel ) ;
75
75
// console.log( discordChannel );
76
76
// Do nothing if the channel wasn't found on this server
77
77
if ( ! discordChannel ) {
@@ -82,7 +82,7 @@ const comfyDiscord = {
82
82
if ( opts && opts . attachment ) {
83
83
const { attachment } = opts ;
84
84
const filename = opts . filename || attachment . substring ( attachment . lastIndexOf ( "/" ) + 1 ) ;
85
- const discordAttachment = new Discord . Attachment ( attachment , filename ) ;
85
+ const discordAttachment = new Discord . MessageAttachment ( attachment , filename ) ;
86
86
prom = discordChannel . send ( message , discordAttachment ) ;
87
87
}
88
88
else {
You can’t perform that action at this time.
0 commit comments