mirror of
https://github.com/Expand-sys/expandchatbotv2
synced 2026-03-22 04:17:11 +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) {
|
async execute(interaction) {
|
||||||
let image_url = null
|
let image_url = null
|
||||||
let imageurl = interaction.options.getAttachment("image").url
|
let imageurl = interaction.options.getAttachment("image").url
|
||||||
interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|
||||||
var resp = await deepai.callStandardApi("deepdream", {
|
var resp = await deepai.callStandardApi("deepdream", {
|
||||||
image: `${imageurl}`,
|
image: `${imageurl}`,
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ module.exports = {
|
||||||
let imageurl = interaction.options.getAttachment("image").url
|
let imageurl = interaction.options.getAttachment("image").url
|
||||||
console.log(interaction.options.getString("prompt"))
|
console.log(interaction.options.getString("prompt"))
|
||||||
let prompt = interaction.options.getString("prompt")
|
let prompt = interaction.options.getString("prompt")
|
||||||
interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|
||||||
var resp = await deepai.callStandardApi("image-editor", {
|
var resp = await deepai.callStandardApi("image-editor", {
|
||||||
image: `${imageurl}`,
|
image: `${imageurl}`,
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,9 @@ module.exports = {
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
let image_url = null
|
let image_url = null
|
||||||
let error = null
|
let error = null
|
||||||
interaction.deferReply()
|
console.log("rice")
|
||||||
|
await interaction.deferReply()
|
||||||
|
console.log("beans")
|
||||||
try{
|
try{
|
||||||
const response = await openai.createImage({
|
const response = await openai.createImage({
|
||||||
prompt: `${interaction.options.getString("prompt")}`,
|
prompt: `${interaction.options.getString("prompt")}`,
|
||||||
|
|
@ -35,6 +37,7 @@ module.exports = {
|
||||||
});
|
});
|
||||||
image_url = response.data.data[0].url;
|
image_url = response.data.data[0].url;
|
||||||
error = response
|
error = response
|
||||||
|
console.log(error)
|
||||||
let embed = new Embed({
|
let embed = new Embed({
|
||||||
"type": "rich",
|
"type": "rich",
|
||||||
"title": `Prompt: ${interaction.options.getString("prompt")}`,
|
"title": `Prompt: ${interaction.options.getString("prompt")}`,
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ module.exports = {
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
const imageParams = new Generation.ImageParameters();
|
const imageParams = new Generation.ImageParameters();
|
||||||
let sfbuffer
|
let sfbuffer
|
||||||
interaction.deferReply()
|
await interaction.deferReply()
|
||||||
imageParams.setWidth(512);
|
imageParams.setWidth(512);
|
||||||
imageParams.setHeight(512);
|
imageParams.setHeight(512);
|
||||||
imageParams.addSeed(11223344);
|
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",
|
"gifencoder": "^2.0.1",
|
||||||
"glob": "^7.2.0",
|
"glob": "^7.2.0",
|
||||||
"got": "^12.5.3",
|
"got": "^12.5.3",
|
||||||
"mongoose": "^6.3.4",
|
|
||||||
"nodemon": "^2.0.19",
|
"nodemon": "^2.0.19",
|
||||||
"openai": "^3.2.1",
|
"openai": "^3.2.1",
|
||||||
"os": "^0.1.2",
|
"os": "^0.1.2",
|
||||||
"pm2": "^5.1.2",
|
"pm2": "^5.1.2"
|
||||||
"rcon-client": "^4.2.3",
|
|
||||||
"rss-parser": "^3.12.0",
|
|
||||||
"sharp": "^0.31.3",
|
|
||||||
"uuid": "^8.3.2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue