-
Notifications
You must be signed in to change notification settings - Fork 198
Open
Description
main.js
const { app, BrowserWindow } = require('electron')
const { DiscordSDK } = require('@discord/embedded-app-sdk')
const createWindow = () => {
const mainWindow = new BrowserWindow({
width: 800,
height: 600,
})
mainWindow.loadFile('index.html')
mainWindow.webContents.openDevTools()
}
const discordSetup = async () => {
const discordSdk = new DiscordSDK('*******************'');
console.log("discordSetup Start");
await discordSdk.ready();
console.log("discordSetup End!");
}
app.whenReady().then(() => {
createWindow();
discordSetup();
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) createWindow()
})
})
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') app.quit()
})package.json
{
"name": "Test",
"version": "1.0.0",
"description": "",
"main": "main.js",
"scripts": {
"start": "electron .",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "whyzotee",
"license": "MIT",
"devDependencies": {
"electron": "^33.2.1"
},
"dependencies": {
"@discord/embedded-app-sdk": "^1.7.1"
}
}i don't know how to fix it please help, thank you.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels