mirror of
https://github.com/Expand-sys/expandchatbotv2
synced 2025-12-15 13:32:15 +11:00
fixes to defer reply
This commit is contained in:
parent
39a3820d83
commit
18b175e34e
6 changed files with 1173 additions and 4088 deletions
|
|
@ -27,7 +27,7 @@ module.exports = {
|
|||
async execute(interaction) {
|
||||
let image_url = null
|
||||
let imageurl = interaction.options.getAttachment("image").url
|
||||
interaction.deferReply()
|
||||
await interaction.deferReply()
|
||||
|
||||
var resp = await deepai.callStandardApi("deepdream", {
|
||||
image: `${imageurl}`,
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ module.exports = {
|
|||
let imageurl = interaction.options.getAttachment("image").url
|
||||
console.log(interaction.options.getString("prompt"))
|
||||
let prompt = interaction.options.getString("prompt")
|
||||
interaction.deferReply()
|
||||
await interaction.deferReply()
|
||||
|
||||
var resp = await deepai.callStandardApi("image-editor", {
|
||||
image: `${imageurl}`,
|
||||
|
|
|
|||
|
|
@ -26,7 +26,9 @@ module.exports = {
|
|||
async execute(interaction) {
|
||||
let image_url = null
|
||||
let error = null
|
||||
interaction.deferReply()
|
||||
console.log("rice")
|
||||
await interaction.deferReply()
|
||||
console.log("beans")
|
||||
try{
|
||||
const response = await openai.createImage({
|
||||
prompt: `${interaction.options.getString("prompt")}`,
|
||||
|
|
@ -35,6 +37,7 @@ module.exports = {
|
|||
});
|
||||
image_url = response.data.data[0].url;
|
||||
error = response
|
||||
console.log(error)
|
||||
let embed = new Embed({
|
||||
"type": "rich",
|
||||
"title": `Prompt: ${interaction.options.getString("prompt")}`,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ module.exports = {
|
|||
async execute(interaction) {
|
||||
const imageParams = new Generation.ImageParameters();
|
||||
let sfbuffer
|
||||
interaction.deferReply()
|
||||
await interaction.deferReply()
|
||||
imageParams.setWidth(512);
|
||||
imageParams.setHeight(512);
|
||||
imageParams.addSeed(11223344);
|
||||
|
|
|
|||
5243
package-lock.json
generated
5243
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -26,14 +26,9 @@
|
|||
"gifencoder": "^2.0.1",
|
||||
"glob": "^7.2.0",
|
||||
"got": "^12.5.3",
|
||||
"mongoose": "^6.3.4",
|
||||
"nodemon": "^2.0.19",
|
||||
"openai": "^3.2.1",
|
||||
"os": "^0.1.2",
|
||||
"pm2": "^5.1.2",
|
||||
"rcon-client": "^4.2.3",
|
||||
"rss-parser": "^3.12.0",
|
||||
"sharp": "^0.31.3",
|
||||
"uuid": "^8.3.2"
|
||||
"pm2": "^5.1.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue