This commit is contained in:
Skillz
2020-12-27 09:47:02 -05:00
11 changed files with 79 additions and 80 deletions

3
.gitignore vendored
View File

@@ -17,3 +17,6 @@ public/
# IntelliJ IDEA
.idea/
# Visual Studio Code
.vscode/

View File

@@ -1,8 +0,0 @@
{
"deno.enable": true,
"editor.defaultFormatter": "denoland.vscode-deno",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
}

View File

@@ -1,5 +1,6 @@
{
"name": "discordeno",
"private": true,
"version": "0.0.1",
"description": "Docs for Discordeno",
"repository": "https://github.com/discordeno/discordeno",
@@ -7,7 +8,6 @@
"docs:dev": "vuepress dev src --host localhost",
"docs:build": "vuepress build src"
},
"license": "MIT",
"devDependencies": {
"vuepress": "^1.7.1",
"vuepress-theme-yuu": "^2.3.0",

View File

@@ -1,7 +1,8 @@
const { name, description, repository } = require("../../package");
const { name, description, repository: repo } = require("../../package");
const nav = require("./navbar");
const sidebar = require("./sidebar");
const title = name[0].toUpperCase() + name.slice(1);
const discordLink = "https://discord.com/invite/5vBgXk3UcZ";
module.exports = {
base: `/`,
@@ -29,65 +30,16 @@ module.exports = {
],
theme: "yuu",
themeConfig: {
repo: repository,
repo,
docsDir: "docs/src",
editLinks: true,
lastUpdated: true,
sidebarDepth: 0,
nav: [
{
text: "Home",
link: "/",
},
{
text: "Docs",
link: "https://doc.deno.land/https/deno.land/x/discordeno/mod.ts",
},
{
text: "Discord",
link: discordLink,
target: "_blank",
},
],
sidebar: {
"/": [
{
title: "Home",
children: [
"/",
"faq",
"gettingstarted",
"djs",
],
},
{
title: "Step By Step Guide",
children: [
"/stepbystep/",
"/stepbystep/createbot",
"/stepbystep/createcommand",
"/stepbystep/createevent",
"/stepbystep/createlanguage",
"/stepbystep/createmonitor",
"/stepbystep/createinhibitor",
"/stepbystep/createtask",
"/stepbystep/hostingbot",
],
},
{
title: "Advanced Guide",
children: [
"/advanced/",
"/advanced/arguments",
"/advanced/customizations",
"/advanced/dockerhosting",
"/advanced/dynamiccommands",
"/advanced/permlevels",
"/advanced/subcommands",
],
},
],
},
nav,
sidebar,
yuu: {
defaultDarkTheme: true
}
},
plugins: [
"@vuepress/plugin-back-to-top",

View File

@@ -0,0 +1,15 @@
module.exports = [
{
text: "Home",
link: "/",
},
{
text: "Docs",
link: "https://doc.deno.land/https/deno.land/x/discordeno/mod.ts",
},
{
text: "Discord",
link: "https://discord.gg/5vBgXk3UcZ",
target: "_blank",
},
]

View File

@@ -0,0 +1,39 @@
module.exports = {
"/": [
{
title: "Home",
children: [
"/",
"faq",
"gettingstarted",
"djs",
],
},
{
title: "Step By Step Guide",
children: [
"/stepbystep/",
"/stepbystep/createbot",
"/stepbystep/createcommand",
"/stepbystep/createevent",
"/stepbystep/createlanguage",
"/stepbystep/createmonitor",
"/stepbystep/createinhibitor",
"/stepbystep/createtask",
"/stepbystep/hostingbot",
],
},
{
title: "Advanced Guide",
children: [
"/advanced/",
"/advanced/arguments",
"/advanced/customizations",
"/advanced/dockerhosting",
"/advanced/dynamiccommands",
"/advanced/permlevels",
"/advanced/subcommands",
],
},
],
}

View File

@@ -24,7 +24,7 @@ const baseChannel: Partial<Channel> = {
},
send(content) {
return sendMessage(this.id!, content);
}
},
};
export async function createChannel(

View File

@@ -1,9 +1,8 @@
# Discordeno Interactions
This subpackage serves as a standalone interactions package that supports the webhooks(https server) side of Discords new Interactions API!
`interactions` is a standalone submodule that supports the webhooks through HTTP server to add support for Discord's interactions feature.
This is a barebones interface that will create and handle requests from Discord API.
- Complete and extremely fast security and verification checks
- First Class TypeScript Experience!
- Minimalistic!
This is a barebones interface that will create and handle requests.
- First-class TypeScript Support
- Minimalistic

View File

@@ -1,2 +1,2 @@
export { serve } from "https://deno.land/std@0.81.0/http/server.ts";
export { verify } from "https://esm.sh/@evan/wasm@0.0.18/target/ed25519/deno.js";
export { verify } from "https://unpkg.com/@evan/wasm@0.0.25/target/ed25519/deno.js";

View File

@@ -12,7 +12,7 @@ export const USER_AGENT =
"DiscordBot (https://github.com/discordeno/discordeno, v10)";
/** https://discord.com/developers/docs/reference#image-formatting-image-base-url */
export const IMAGE_BASE_URL = "https://cdn.discordapp.com/";
export const IMAGE_BASE_URL = "https://cdn.discordapp.com";
// This can be modified by big brain bots and use a proxy
export const baseEndpoints = {

View File

@@ -1,14 +1,17 @@
import { assert, assertEquals, delay } from "../deps.ts";
import {
botID,
cache,
channelOverwriteHasPermission,
createGuildChannel,
createGuildRole,
createServer,
delay,
deleteChannel,
deleteRole,
deleteServer,
editChannel,
editRole,
getChannel,
getMessage,
Guild,
Intents,
@@ -17,11 +20,7 @@ import {
sendMessage,
startBot,
} from "../mod.ts";
import {
channelOverwriteHasPermission,
editChannel,
} from "../src/handlers/channel.ts";
import { getChannel } from "../src/handlers/guild.ts";
import { assert, assertEquals } from "./deps.ts";
const token = Deno.env.get("DISCORD_TOKEN");
if (!token) throw "Token is not provided";