@open-discord-bots/framework 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1110,16 +1110,9 @@ class ODModalResponderInstance {
|
|
|
1110
1110
|
async reply(msg) {
|
|
1111
1111
|
try {
|
|
1112
1112
|
const msgFlags = msg.ephemeral ? [discord.MessageFlags.Ephemeral] : [];
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
return { success: true, message: sent };
|
|
1117
|
-
}
|
|
1118
|
-
else {
|
|
1119
|
-
const sent = await this.interaction.reply(Object.assign(msg.message, { flags: msgFlags }));
|
|
1120
|
-
this.didReply = true;
|
|
1121
|
-
return { success: true, message: await sent.fetch() };
|
|
1122
|
-
}
|
|
1113
|
+
const sent = await this.interaction.followUp(Object.assign(msg.message, { flags: msgFlags }));
|
|
1114
|
+
this.didReply = true;
|
|
1115
|
+
return { success: true, message: sent };
|
|
1123
1116
|
}
|
|
1124
1117
|
catch {
|
|
1125
1118
|
return { success: false, message: null };
|
|
@@ -1134,8 +1127,11 @@ class ODModalResponderInstance {
|
|
|
1134
1127
|
this.didReply = true;
|
|
1135
1128
|
return { success: true, message: await sent.fetch() };
|
|
1136
1129
|
}
|
|
1137
|
-
else
|
|
1138
|
-
|
|
1130
|
+
else {
|
|
1131
|
+
const sent = await this.interaction.reply(Object.assign(msg.message, { flags: msgFlags }));
|
|
1132
|
+
this.didReply = true;
|
|
1133
|
+
return { success: true, message: await sent.fetch() };
|
|
1134
|
+
}
|
|
1139
1135
|
}
|
|
1140
1136
|
catch {
|
|
1141
1137
|
return { success: false, message: null };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-discord-bots/framework",
|
|
3
3
|
"author": "DJj123dj",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.7",
|
|
5
5
|
"description": "The core framework of the popular open-source discord bots: Open Ticket & Open Moderation.",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -1071,15 +1071,9 @@ export class ODModalResponderInstance {
|
|
|
1071
1071
|
async reply(msg:ODMessageBuildResult): Promise<ODMessageBuildSentResult<boolean>> {
|
|
1072
1072
|
try{
|
|
1073
1073
|
const msgFlags: number[] = msg.ephemeral ? [discord.MessageFlags.Ephemeral] : []
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
return {success:true,message:sent}
|
|
1078
|
-
}else{
|
|
1079
|
-
const sent = await this.interaction.reply(Object.assign(msg.message,{flags:msgFlags}))
|
|
1080
|
-
this.didReply = true
|
|
1081
|
-
return {success:true,message:await sent.fetch()}
|
|
1082
|
-
}
|
|
1074
|
+
const sent = await this.interaction.followUp(Object.assign(msg.message,{flags:msgFlags}))
|
|
1075
|
+
this.didReply = true
|
|
1076
|
+
return {success:true,message:sent}
|
|
1083
1077
|
}catch{
|
|
1084
1078
|
return {success:false,message:null}
|
|
1085
1079
|
}
|
|
@@ -1092,7 +1086,11 @@ export class ODModalResponderInstance {
|
|
|
1092
1086
|
const sent = await this.interaction.editReply(Object.assign(msg.message,{flags:msgFlags}))
|
|
1093
1087
|
this.didReply = true
|
|
1094
1088
|
return {success:true,message:await sent.fetch()}
|
|
1095
|
-
}else
|
|
1089
|
+
}else{
|
|
1090
|
+
const sent = await this.interaction.reply(Object.assign(msg.message,{flags:msgFlags}))
|
|
1091
|
+
this.didReply = true
|
|
1092
|
+
return {success:true,message:await sent.fetch()}
|
|
1093
|
+
}
|
|
1096
1094
|
}catch{
|
|
1097
1095
|
return {success:false,message:null}
|
|
1098
1096
|
}
|