remove ugly ai loading embed

This commit is contained in:
derpystuff 2023-04-20 01:00:14 +02:00
parent 3aeb9bfdc7
commit f11cb26560
7 changed files with 5 additions and 29 deletions

View file

@ -26,9 +26,7 @@ module.exports = {
try{ try{
let s = Date.now() let s = Date.now()
await context.respond({data: {}, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE}) await context.respond({data: {}, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE})
await context.editOrRespond({
embeds: [createEmbed("loading_ai", context)]
})
let res = await superagent.get(`${process.env.AI_SERVER}/gpt`) let res = await superagent.get(`${process.env.AI_SERVER}/gpt`)
.query({ .query({
model: MODEL, model: MODEL,

View file

@ -25,9 +25,7 @@ module.exports = {
try{ try{
let s = Date.now() let s = Date.now()
await context.respond({data: {}, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE}) await context.respond({data: {}, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE})
await context.editOrRespond({
embeds: [createEmbed("loading_ai", context)]
})
let res = await superagent.get(`${process.env.AI_SERVER}/gpt`) let res = await superagent.get(`${process.env.AI_SERVER}/gpt`)
.query({ .query({
model: MODEL, model: MODEL,

View file

@ -25,9 +25,7 @@ module.exports = {
try{ try{
let s = Date.now() let s = Date.now()
await context.respond({data: {}, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE}) await context.respond({data: {}, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE})
await context.editOrRespond({
embeds: [createEmbed("loading_ai", context)]
})
let res = await superagent.get(`${process.env.AI_SERVER}/gpt`) let res = await superagent.get(`${process.env.AI_SERVER}/gpt`)
.query({ .query({
model: MODEL, model: MODEL,

View file

@ -25,9 +25,7 @@ module.exports = {
try{ try{
let s = Date.now() let s = Date.now()
await context.respond({data: {}, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE}) await context.respond({data: {}, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE})
await context.editOrRespond({
embeds: [createEmbed("loading_ai", context)]
})
let res = await superagent.get(`${process.env.AI_SERVER}/gpt`) let res = await superagent.get(`${process.env.AI_SERVER}/gpt`)
.query({ .query({
model: MODEL, model: MODEL,

View file

@ -25,9 +25,7 @@ module.exports = {
try{ try{
let s = Date.now() let s = Date.now()
await context.respond({data: {}, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE}) await context.respond({data: {}, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE})
await context.editOrRespond({
embeds: [createEmbed("loading_ai", context)]
})
let res = await superagent.get(`${process.env.AI_SERVER}/gpt`) let res = await superagent.get(`${process.env.AI_SERVER}/gpt`)
.query({ .query({
model: MODEL, model: MODEL,

View file

@ -69,15 +69,6 @@ const embedTypes = Object.freeze({
}, },
color: COLORS.embed color: COLORS.embed
} }
},
"loading_ai": (context) => {
return {
author: {
iconUrl: STATIC_ICONS.loading_ai,
name: `Generating...`
},
color: COLORS.brand
}
} }
}) })

View file

@ -82,10 +82,6 @@ const Statics = Object.freeze({
file: "icons/core/ico_notice_loading.gif", file: "icons/core/ico_notice_loading.gif",
revision: 0 revision: 0
}, },
loading_ai: {
file: "icons/ai/ico_ai_generating.gif",
revision: 0
},
warning: { warning: {
file: "icons/core/ico_notice_warning.png", file: "icons/core/ico_notice_warning.png",
revision: 0 revision: 0
@ -124,6 +120,5 @@ module.exports.STATIC_ICONS = Object.freeze({
adult: staticAsset(Statics.icons.adult), adult: staticAsset(Statics.icons.adult),
error: staticAsset(Statics.icons.error), error: staticAsset(Statics.icons.error),
loading: staticAsset(Statics.icons.loading), loading: staticAsset(Statics.icons.loading),
loading_ai: staticAsset(Statics.icons.loading_ai),
warning: staticAsset(Statics.icons.warning) warning: staticAsset(Statics.icons.warning)
}) })