stableHorde api key
This commit is contained in:
parent
c5cacbb78b
commit
332f1730d6
2 changed files with 5 additions and 2 deletions
|
@ -12,4 +12,5 @@ twiTokenSecret=TwitterSecretToken
|
||||||
twiChannel=ChannelWhereJustTheTwitterLinkAreSent
|
twiChannel=ChannelWhereJustTheTwitterLinkAreSent
|
||||||
twiLogChannel=ChannelWhereTheDetailedInfoOfTheCommandIsSent
|
twiLogChannel=ChannelWhereTheDetailedInfoOfTheCommandIsSent
|
||||||
botsggToken=APITokenForBots.gg
|
botsggToken=APITokenForBots.gg
|
||||||
botsggEndpoint=https://discord.bots.gg/api/v1
|
botsggEndpoint=https://discord.bots.gg/api/v1
|
||||||
|
stableHordeApi=0000000000
|
|
@ -3,6 +3,8 @@ import fetch from 'node-fetch';
|
||||||
import fs from 'node:fs';
|
import fs from 'node:fs';
|
||||||
import os from 'node:os';
|
import os from 'node:os';
|
||||||
|
|
||||||
|
const { stableHordeApi } = process.env;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data: new SlashCommandBuilder()
|
data: new SlashCommandBuilder()
|
||||||
.setName('stablediffusion')
|
.setName('stablediffusion')
|
||||||
|
@ -42,7 +44,7 @@ async function generate(i, prompt) {
|
||||||
const fetchParameters = {
|
const fetchParameters = {
|
||||||
method: 'post',
|
method: 'post',
|
||||||
body: JSON.stringify(body),
|
body: JSON.stringify(body),
|
||||||
headers: { 'Content-Type': 'application/json', 'apikey': '0000000000' },
|
headers: { 'Content-Type': 'application/json', 'apikey': stableHordeApi },
|
||||||
};
|
};
|
||||||
|
|
||||||
let response = await fetch('https://stablehorde.net/api/v2/generate/sync', fetchParameters);
|
let response = await fetch('https://stablehorde.net/api/v2/generate/sync', fetchParameters);
|
||||||
|
|
Loading…
Reference in a new issue