This commit is contained in:
Fishuke 2020-12-29 01:02:43 +03:00
parent 36e174a50a
commit 7d441688e2
10 changed files with 23 additions and 23 deletions

View file

@ -200,7 +200,7 @@ export interface ClientEvents extends EventTypes {
/**
* A Guild Member was updated. Nickname changed, role assigned, etc.
* @param before Member object before update
* @param after Meber object after update
* @param after Member object after update
*/
guildMemberUpdate: (before: Member, after: Member) => void
/**

View file

@ -76,7 +76,7 @@ export class DefaultCacheAdapter implements ICacheAdapter {
}
}
/** Redis Cache Adatper for using Redis as a cache-provider. */
/** Redis Cache Adapter for using Redis as a cache-provider. */
export class RedisCacheAdapter implements ICacheAdapter {
_redis: Promise<Redis>
redis?: Redis

View file

@ -18,7 +18,7 @@ export interface CommandContext {
channel: TextChannel
/** Prefix which was used */
prefix: string
/** Oject of Command which was used */
/** Object of Command which was used */
command: Command
/** Name of Command which was used */
name: string

View file

@ -67,7 +67,7 @@ export class Extension {
description?: string
/** Extensions's Commands Manager */
commands: ExtensionCommands = new ExtensionCommands(this)
/** Sub-Prefix to be used for ALL of Extenion's Commands. */
/** Sub-Prefix to be used for ALL of Extension's Commands. */
subPrefix?: string
/** Events registered by this Extension */
events: { [name: string]: (...args: any[]) => {} } = {}

View file

@ -7,7 +7,7 @@ import { RESTManager } from './rest.ts'
// TODO(DjDeveloperr)
// I'm kinda confused; will continue on this later once
// Deno namespace in Web Woker is stable!
// Deno namespace in Web Worker is stable!
export interface ShardManagerOptions {
client: Client | typeof Client
token?: string

View file

@ -17,7 +17,7 @@ export default class AddEmojiCommand extends Command {
.then((emoji) => {
if (emoji === undefined) throw new Error('Unknown')
ctx.message.reply(
`Successfuly added emoji ${emoji.toString()} ${emoji.name}!`
`Successfully added emoji ${emoji.toString()} ${emoji.name}!`
)
})
.catch((e) => {

View file

@ -265,7 +265,7 @@ export interface MessageActivity {
export interface MessageApplication {
id: string
cover_image?: string
desription: string
description: string
icon: string | undefined
name: string
}

View file

@ -24,8 +24,8 @@ const GUILD_INTEGRATION = (guildID: string, integrationID: string): string =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/guilds/${guildID}/integrations/${integrationID}`
const GUILD_INTEGRATIONS = (guildID: string): string =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/guilds/${guildID}/integrations`
const GUILD_INTEGARTION_SYNC = (guildID: string): string =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/guilds/${guildID}/integrations?include_appilications=true`
const GUILD_INTEGRATIONS_SYNC = (guildID: string): string =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/guilds/${guildID}/integrations?include_applications=true`
const GUILD_BAN = (guildID: string, userID: string): string =>
`${DISCORD_API_URL}/v${DISCORD_API_VERSION}/guilds/${guildID}/bans/${userID}`
const GUILD_BANS = (guildID: string): string =>
@ -229,7 +229,7 @@ export {
GUILD_ROLES,
GUILD_INTEGRATION,
GUILD_INTEGRATIONS,
GUILD_INTEGARTION_SYNC,
GUILD_INTEGRATIONS_SYNC,
GUILD_WIDGET_IMAGE,
GUILD_BAN,
GUILD_BANS,

View file

@ -1,4 +1,4 @@
/** Delay by `ms` miliseconds */
/** Delay by `ms` milliseconds */
export const delay = async (ms: number): Promise<true> =>
await new Promise((resolve, reject) => {
setTimeout(() => resolve(true), ms)

View file

@ -1,11 +1,11 @@
import { GatewayIntents } from '../types/gateway.ts'
export type PriviligedIntents = 'GUILD_MEMBERS' | 'GUILD_PRESENCES'
export type PrivilegedIntents = 'GUILD_MEMBERS' | 'GUILD_PRESENCES'
/* eslint-disable @typescript-eslint/no-extraneous-class */
/** Utility class for handling Gateway Intents */
export class Intents {
static NonPriviliged: number[] = [
static NonPrivileged: number[] = [
GatewayIntents.GUILD_MESSAGES,
GatewayIntents.DIRECT_MESSAGES,
GatewayIntents.DIRECT_MESSAGE_REACTIONS,
@ -24,32 +24,32 @@ export class Intents {
static All: number[] = [
GatewayIntents.GUILD_MEMBERS,
GatewayIntents.GUILD_PRESENCES,
...Intents.NonPriviliged
...Intents.NonPrivileged
]
static Presence: number[] = [
GatewayIntents.GUILD_PRESENCES,
...Intents.NonPriviliged
...Intents.NonPrivileged
]
static GuildMembers: number[] = [
GatewayIntents.GUILD_MEMBERS,
...Intents.NonPriviliged
...Intents.NonPrivileged
]
static None: number[] = [...Intents.NonPriviliged]
static None: number[] = [...Intents.NonPrivileged]
/** Create an Array of Intents easily passing Intents you're priviliged for and disable the ones you don't need */
/** Create an Array of Intents easily passing Intents you're privileged for and disable the ones you don't need */
static create(
priviliged?: PriviligedIntents[],
privileged?: PrivilegedIntents[],
disable?: number[]
): number[] {
let intents: number[] = [...Intents.NonPriviliged]
let intents: number[] = [...Intents.NonPrivileged]
if (priviliged !== undefined && priviliged.length !== 0) {
if (priviliged.includes('GUILD_MEMBERS'))
if (privileged !== undefined && privileged.length !== 0) {
if (privileged.includes('GUILD_MEMBERS'))
intents.push(GatewayIntents.GUILD_MEMBERS)
if (priviliged.includes('GUILD_PRESENCES'))
if (privileged.includes('GUILD_PRESENCES'))
intents.push(GatewayIntents.GUILD_PRESENCES)
}