@stelliajs/framework 1.1.2 → 1.1.3
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.
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { MessageFlags } from "discord.js";
|
|
1
2
|
export const ephemeralFollowUpResponse = async (interaction, data, automaticDeletion = false) => {
|
|
2
3
|
if (!interaction.deferred) {
|
|
3
|
-
await interaction.deferReply({
|
|
4
|
+
await interaction.deferReply({ flags: MessageFlags.Ephemeral });
|
|
4
5
|
}
|
|
5
6
|
if (typeof data === "string") {
|
|
6
|
-
await interaction.followUp({ content: data,
|
|
7
|
+
await interaction.followUp({ content: data, flags: MessageFlags.Ephemeral });
|
|
7
8
|
}
|
|
8
9
|
else {
|
|
9
|
-
await interaction.followUp({ ...data,
|
|
10
|
+
await interaction.followUp({ ...data, flags: MessageFlags.Ephemeral });
|
|
10
11
|
}
|
|
11
12
|
if (automaticDeletion) {
|
|
12
13
|
setTimeout(() => {
|
|
@@ -19,13 +20,13 @@ export const ephemeralFollowUpResponse = async (interaction, data, automaticDele
|
|
|
19
20
|
};
|
|
20
21
|
export const ephemeralReplyResponse = async (interaction, data, automaticDeletion = false) => {
|
|
21
22
|
if (!interaction.deferred) {
|
|
22
|
-
await interaction.deferReply({
|
|
23
|
+
await interaction.deferReply({ flags: MessageFlags.Ephemeral });
|
|
23
24
|
}
|
|
24
25
|
if (typeof data === "string") {
|
|
25
|
-
await interaction.reply({ content: data,
|
|
26
|
+
await interaction.reply({ content: data, flags: MessageFlags.Ephemeral });
|
|
26
27
|
}
|
|
27
28
|
else {
|
|
28
|
-
await interaction.reply({ ...data,
|
|
29
|
+
await interaction.reply({ ...data, flags: MessageFlags.Ephemeral });
|
|
29
30
|
}
|
|
30
31
|
if (automaticDeletion) {
|
|
31
32
|
setTimeout(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stelliajs/framework",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"keywords": ["discord", "bot", "discordjs", "typescript", "framework"],
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"discord-api-types": "^0.37.115",
|
|
19
|
-
"discord.js": "^14.17.
|
|
19
|
+
"discord.js": "^14.17.3"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"ts-node": "^10.9.2",
|