-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc8ac4d
commit 76f2c7b
Showing
10 changed files
with
200 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
for(const{token:n,options:t,events:e}of(await import("../Option/DISCORD.js")).default){if(!t)continue;const o=new(await import("discord.js")).Client(t);for(const[i,a]of e??[])o.on(i,a);o.login(n)}var f={};export{f as default}; | ||
for (const { token: n, options: t, events: e } of ( | ||
await import("../Option/DISCORD.js") | ||
).default) { | ||
if (!t) continue; | ||
const o = new (await import("discord.js")).Client(t); | ||
for (const [i, a] of e ?? []) o.on(i, a); | ||
o.login(n); | ||
} | ||
var f = {}; | ||
export { f as default }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import type { StartOptions } from "pm2"; | ||
export type Apps = StartOptions[]; | ||
export type Ecosystem = { | ||
apps: Apps; | ||
apps: Apps; | ||
}; | ||
declare const _default: { | ||
apps: { | ||
name: string; | ||
script: string; | ||
watch: true; | ||
autorestart: true; | ||
force: true; | ||
}[]; | ||
apps: { | ||
name: string; | ||
script: string; | ||
watch: true; | ||
autorestart: true; | ||
force: true; | ||
}[]; | ||
}; | ||
export default _default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
var t={apps:[{name:"discord",script:"./Target/apps/discord.js",watch:!0,autorestart:!0,force:!0}]};export{t as default}; | ||
var t = { | ||
apps: [ | ||
{ | ||
name: "discord", | ||
script: "./Target/apps/discord.js", | ||
watch: !0, | ||
autorestart: !0, | ||
force: !0, | ||
}, | ||
], | ||
}; | ||
export { t as default }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
import{default as a}from"./Application/Discord.js";export{a as Discord}; | ||
import { default as a } from "./Application/Discord.js"; | ||
export { a as Discord }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,76 @@ | ||
export declare const object: <T extends import("zod").ZodRawShape>(shape: T, params?: import("zod").RawCreateParams) => import("zod").ZodObject<T, "strip", import("zod").ZodTypeAny, { [k_1 in keyof import("zod").objectUtil.addQuestionMarks<import("zod").baseObjectOutputType<T>, { [k in keyof import("zod").baseObjectOutputType<T>]: undefined extends import("zod").baseObjectOutputType<T>[k] ? never : k; }[keyof T]>]: import("zod").objectUtil.addQuestionMarks<import("zod").baseObjectOutputType<T>, { [k_2 in keyof import("zod").baseObjectOutputType<T>]: undefined extends import("zod").baseObjectOutputType<T>[k_2] ? never : k_2; }[keyof T]>[k_1]; }, { [k_2 in keyof import("zod").baseObjectInputType<T>]: import("zod").baseObjectInputType<T>[k_2]; }>, string: (params?: ({ | ||
errorMap?: import("zod").ZodErrorMap | undefined; | ||
invalid_type_error?: string | undefined; | ||
required_error?: string | undefined; | ||
description?: string | undefined; | ||
} & { | ||
coerce?: true | undefined; | ||
}) | undefined) => import("zod").ZodString; | ||
declare const _default: import("zod").ZodObject<{ | ||
DISCORD_APPLICATION_ID: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>; | ||
DISCORD_CLIENT_ID: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>; | ||
DISCORD_CLIENT_SECRET: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>; | ||
DISCORD_PUBLIC_KEY: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>; | ||
DISCORD_TOKENS: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>; | ||
}, "strip", import("zod").ZodTypeAny, { | ||
DISCORD_APPLICATION_ID: string; | ||
DISCORD_CLIENT_ID: string; | ||
DISCORD_CLIENT_SECRET: string; | ||
DISCORD_PUBLIC_KEY: string; | ||
DISCORD_TOKENS: string; | ||
}, { | ||
DISCORD_APPLICATION_ID?: string | undefined; | ||
DISCORD_CLIENT_ID?: string | undefined; | ||
DISCORD_CLIENT_SECRET?: string | undefined; | ||
DISCORD_PUBLIC_KEY?: string | undefined; | ||
DISCORD_TOKENS?: string | undefined; | ||
}>; | ||
export declare const object: <T extends import("zod").ZodRawShape>( | ||
shape: T, | ||
params?: import("zod").RawCreateParams, | ||
) => import("zod").ZodObject< | ||
T, | ||
"strip", | ||
import("zod").ZodTypeAny, | ||
{ | ||
[k_1 in keyof import("zod").objectUtil.addQuestionMarks< | ||
import("zod").baseObjectOutputType<T>, | ||
{ | ||
[k in keyof import("zod").baseObjectOutputType<T>]: undefined extends import("zod").baseObjectOutputType<T>[k] | ||
? never | ||
: k; | ||
}[keyof T] | ||
>]: import("zod").objectUtil.addQuestionMarks< | ||
import("zod").baseObjectOutputType<T>, | ||
{ | ||
[k_2 in keyof import("zod").baseObjectOutputType<T>]: undefined extends import("zod").baseObjectOutputType<T>[k_2] | ||
? never | ||
: k_2; | ||
}[keyof T] | ||
>[k_1]; | ||
}, | ||
{ | ||
[k_2 in keyof import("zod").baseObjectInputType<T>]: import("zod").baseObjectInputType<T>[k_2]; | ||
} | ||
>, | ||
string: ( | ||
params?: | ||
| ({ | ||
errorMap?: import("zod").ZodErrorMap | undefined; | ||
invalid_type_error?: string | undefined; | ||
required_error?: string | undefined; | ||
description?: string | undefined; | ||
} & { | ||
coerce?: true | undefined; | ||
}) | ||
| undefined, | ||
) => import("zod").ZodString; | ||
declare const _default: import("zod").ZodObject< | ||
{ | ||
DISCORD_APPLICATION_ID: import("zod").ZodDefault< | ||
import("zod").ZodOptional<import("zod").ZodString> | ||
>; | ||
DISCORD_CLIENT_ID: import("zod").ZodDefault< | ||
import("zod").ZodOptional<import("zod").ZodString> | ||
>; | ||
DISCORD_CLIENT_SECRET: import("zod").ZodDefault< | ||
import("zod").ZodOptional<import("zod").ZodString> | ||
>; | ||
DISCORD_PUBLIC_KEY: import("zod").ZodDefault< | ||
import("zod").ZodOptional<import("zod").ZodString> | ||
>; | ||
DISCORD_TOKENS: import("zod").ZodDefault< | ||
import("zod").ZodOptional<import("zod").ZodString> | ||
>; | ||
}, | ||
"strip", | ||
import("zod").ZodTypeAny, | ||
{ | ||
DISCORD_APPLICATION_ID: string; | ||
DISCORD_CLIENT_ID: string; | ||
DISCORD_CLIENT_SECRET: string; | ||
DISCORD_PUBLIC_KEY: string; | ||
DISCORD_TOKENS: string; | ||
}, | ||
{ | ||
DISCORD_APPLICATION_ID?: string | undefined; | ||
DISCORD_CLIENT_ID?: string | undefined; | ||
DISCORD_CLIENT_SECRET?: string | undefined; | ||
DISCORD_PUBLIC_KEY?: string | undefined; | ||
DISCORD_TOKENS?: string | undefined; | ||
} | ||
>; | ||
export default _default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
(await import("dotenv")).config();const{object:o,string:t}=await import("zod");var a=o({DISCORD_APPLICATION_ID:t().optional().default(""),DISCORD_CLIENT_ID:t().optional().default(""),DISCORD_CLIENT_SECRET:t().optional().default(""),DISCORD_PUBLIC_KEY:t().optional().default(""),DISCORD_TOKENS:t().optional().default("")});export{a as default,o as object,t as string}; | ||
(await import("dotenv")).config(); | ||
const { object: o, string: t } = await import("zod"); | ||
var a = o({ | ||
DISCORD_APPLICATION_ID: t().optional().default(""), | ||
DISCORD_CLIENT_ID: t().optional().default(""), | ||
DISCORD_CLIENT_SECRET: t().optional().default(""), | ||
DISCORD_PUBLIC_KEY: t().optional().default(""), | ||
DISCORD_TOKENS: t().optional().default(""), | ||
}); | ||
export { a as default, o as object, t as string }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,70 @@ | ||
import{GatewayIntentBits as s}from"discord.js";const{DISCORD_APPLICATION_ID:l,DISCORD_PUBLIC_KEY:c,DISCORD_TOKENS:i}=(await import("../Library/Environment.js")).default.parse(process.env),g=i.indexOf(",")!==-1?i.split(","):[i],m=[{token:"",events:new Map([["message",async t=>{console.log(t)}]]),options:{intents:[s.GuildMembers,s.GuildMessages,s.Guilds,s.MessageContent]},preflight:async t=>{const e=l;if(!c)throw new Error("The DISCORD_TOKEN environment variable is required.");async function o(a){const n=await fetch(a,{headers:{"Content-Type":"application/json",Authorization:`Bot ${t}`},method:"PUT",body:JSON.stringify([AWW_COMMAND,INVITE_COMMAND])});if(n.ok)console.log("Registered all commands");else{console.error("Error registering commands");const p=await n.text();console.error(p)}return n}async function r(){await o(`https://discord.com/api/v10/applications/${e}/commands`)}await r()}}];var f=m.map((t,e)=>{const o=g[e];return o?t.token=o:console.log(`No token for client: ${e}`),t});export{m as Clients,l as DISCORD_APPLICATION_ID,c as DISCORD_PUBLIC_KEY,i as DISCORD_TOKENS,g as Tokens,f as default}; | ||
import { GatewayIntentBits as s } from "discord.js"; | ||
const { | ||
DISCORD_APPLICATION_ID: l, | ||
DISCORD_PUBLIC_KEY: c, | ||
DISCORD_TOKENS: i, | ||
} = (await import("../Library/Environment.js")).default.parse(process.env), | ||
g = i.indexOf(",") !== -1 ? i.split(",") : [i], | ||
m = [ | ||
{ | ||
token: "", | ||
events: new Map([ | ||
[ | ||
"message", | ||
async (t) => { | ||
console.log(t); | ||
}, | ||
], | ||
]), | ||
options: { | ||
intents: [ | ||
s.GuildMembers, | ||
s.GuildMessages, | ||
s.Guilds, | ||
s.MessageContent, | ||
], | ||
}, | ||
preflight: async (t) => { | ||
const e = l; | ||
if (!c) | ||
throw new Error( | ||
"The DISCORD_TOKEN environment variable is required.", | ||
); | ||
async function o(a) { | ||
const n = await fetch(a, { | ||
headers: { | ||
"Content-Type": "application/json", | ||
Authorization: `Bot ${t}`, | ||
}, | ||
method: "PUT", | ||
body: JSON.stringify([AWW_COMMAND, INVITE_COMMAND]), | ||
}); | ||
if (n.ok) console.log("Registered all commands"); | ||
else { | ||
console.error("Error registering commands"); | ||
const p = await n.text(); | ||
console.error(p); | ||
} | ||
return n; | ||
} | ||
async function r() { | ||
await o( | ||
`https://discord.com/api/v10/applications/${e}/commands`, | ||
); | ||
} | ||
await r(); | ||
}, | ||
}, | ||
]; | ||
var f = m.map((t, e) => { | ||
const o = g[e]; | ||
return o ? (t.token = o) : console.log(`No token for client: ${e}`), t; | ||
}); | ||
export { | ||
m as Clients, | ||
l as DISCORD_APPLICATION_ID, | ||
c as DISCORD_PUBLIC_KEY, | ||
i as DISCORD_TOKENS, | ||
g as Tokens, | ||
f as default, | ||
}; |