fix: change deps from bot to dd

This commit is contained in:
H01001000
2022-12-06 00:36:56 +08:00
parent 3518d917bd
commit 58440ffbf5
27 changed files with 45 additions and 94 deletions

View File

@@ -6,11 +6,10 @@
### Modules
- [@discordeno/bot](modules/discordeno_bot.md)
- [@discordeno/gateway](modules/discordeno_gateway.md)
- [@discordeno/logger](modules/discordeno_logger.md)
- [@discordeno/rest](modules/discordeno_rest.md)
- [@discordeno/types](modules/discordeno_types.md)
- [@discordeno/utils](modules/discordeno_utils.md)
- [bot](modules/bot.md)
- [@discordeno/client](modules/discordeno_client.md)
- [discordeno](modules/discordeno.md)

View File

@@ -4,9 +4,7 @@
"private": true,
"type": "module",
"workspaces": [
"packages/*",
"packages/plugins/cache",
"packages/plugins/utils"
"packages/*"
],
"scripts": {
"build": "turbo run build",
@@ -44,4 +42,4 @@
]
},
"packageManager": "yarn@3.3.0"
}
}

View File

@@ -1,13 +1,15 @@
// The order of the import is important
import {
import type {
DiscordEmbed,
Embed,
formatImageURL,
iconBigintToHash,
ImageFormat,
ImageSize,
User
} from './deps.js'
import {
formatImageURL,
iconBigintToHash
} from './deps.js'
import { routes } from '@discordeno/utils'

View File

@@ -22,7 +22,6 @@
"test:test-type": "tsc --project tsconfig.test.json"
},
"devDependencies": {
"@discordeno/bot": "18.0.0-alpha.1",
"@discordeno/gateway": "18.0.0-alpha.1",
"@swc/cli": "^0.1.57",
"@swc/core": "^1.3.21",
@@ -32,6 +31,7 @@
"@types/sinon": "^10.0.13",
"c8": "^7.12.0",
"chai": "^4.3.7",
"discordeno": "18.0.0-alpha.1",
"eslint": "^8.0.1",
"eslint-config-discordeno": "*",
"mocha": "^10.1.0",

View File

@@ -9,8 +9,8 @@ import type {
PresenceUpdate,
User,
Webhook
} from '@discordeno/bot'
import { Collection } from '@discordeno/bot'
} from 'discordeno'
import { Collection } from 'discordeno'
export type BotWithCache<B extends Bot = Bot> = Omit<B, 'helpers'> &
CacheProps & {

View File

@@ -1,5 +1,5 @@
import type { Bot, DiscordGatewayPayload, Guild } from '@discordeno/bot'
import type { Shard } from '@discordeno/gateway'
import type { Bot, DiscordGatewayPayload, Guild } from 'discordeno'
import type { BotWithCache } from './addCacheCollections.js'
const processing = new Set<bigint>()

View File

@@ -1,5 +1,5 @@
import type { Bot, DiscordGuildEmojisUpdate } from '@discordeno/bot'
import { Collection } from '@discordeno/bot'
import type { Bot, DiscordGuildEmojisUpdate } from 'discordeno'
import { Collection } from 'discordeno'
import type { BotWithCache } from './addCacheCollections.js'
import { addCacheCollections } from './addCacheCollections.js'
import { setupCacheEdits } from './setupCacheEdits.js'

View File

@@ -6,7 +6,7 @@ import type {
DiscordMessageReactionRemove,
DiscordMessageReactionRemoveAll,
DiscordVoiceState
} from '@discordeno/bot'
} from 'discordeno'
import type { BotWithCache } from './addCacheCollections.js'
export function setupCacheEdits<B extends Bot> (bot: BotWithCache<B>): void {

View File

@@ -1,5 +1,4 @@
import type {
Emoji,
Bot,
DiscordChannel,
DiscordGuildBanAddRemove,
@@ -9,9 +8,9 @@ import type {
DiscordMessageDelete,
DiscordMessageDeleteBulk,
DiscordUnavailableGuild,
DiscordVoiceState
} from '@discordeno/bot'
import { Collection } from '@discordeno/bot'
DiscordVoiceState, Emoji
} from 'discordeno'
import { Collection } from 'discordeno'
import type { BotWithCache } from './addCacheCollections.js'
export function setupCacheRemovals<B extends Bot> (bot: BotWithCache<B>): void {

View File

@@ -1,4 +1,4 @@
import type { Bot, Member } from '@discordeno/bot'
import type { Bot, Member } from 'discordeno'
import type { BotWithCache } from './addCacheCollections.js'
import { dispatchRequirements } from './dispatchRequirements.js'

View File

@@ -27,7 +27,7 @@
"eslint": "^8.0.1",
"eslint-config-discordeno": "*",
"tsconfig": "*",
"@discordeno/bot": "18.0.0-alpha.1",
"discordeno": "18.0.0-alpha.1",
"typescript": "^4.9.3"
},
"dependencies": {

View File

@@ -1,4 +1,4 @@
import { Bot } from '@discordeno/bot'
import type { Bot } from 'discordeno'
// iMpOrTaNt to make sure files can be reloaded properly!
export let uniqueFilePathCounter = 0

View File

@@ -1,4 +1,4 @@
import {
import type {
ApplicationCommandOptionChoice,
BigString,
Bot,
@@ -10,8 +10,8 @@ import {
ListGuildMembers,
Member,
Message
} from '@discordeno/bot'
import { BotWithCache } from '../cache/src/addCacheCollections.js'
} from 'discordeno'
import type { BotWithCache } from '../cache/src/addCacheCollections.js'
import { cloneChannel } from './src/channels.js'
import { disconnectMember } from './src/disconnectMember.js'
import { fetchAndRetrieveMembers } from './src/fetchAndRetrieveMembers.js'
@@ -22,11 +22,11 @@ import { sendDirectMessage } from './src/sendDirectMessage.js'
import { sendPrivateInteractionResponse } from './src/sendPrivateInteractionResponse.js'
import { sendTextMessage } from './src/sendTextMessage.js'
import { suppressEmbeds } from './src/suppressEmbeds.js'
import type { ModifyThread } from './src/threads.js'
import {
archiveThread,
editThread,
lockThread,
ModifyThread,
unarchiveThread,
unlockThread
} from './src/threads.js'

View File

@@ -22,7 +22,6 @@
"test:test-type": "tsc --project tsconfig.test.json"
},
"devDependencies": {
"@discordeno/bot": "18.0.0-alpha.1",
"@swc/cli": "^0.1.57",
"@swc/core": "^1.3.21",
"@types/chai": "^4",
@@ -31,6 +30,7 @@
"@types/sinon": "^10.0.13",
"c8": "^7.12.0",
"chai": "^4.3.7",
"discordeno": "18.0.0-alpha.1",
"eslint": "^8.0.1",
"eslint-config-discordeno": "*",
"mocha": "^10.1.0",

View File

@@ -1,5 +1,5 @@
import type { Bot, Channel, CreateGuildChannel } from '@discordeno/bot'
import { separateOverwrites } from '@discordeno/bot'
import type { Bot, Channel, CreateGuildChannel } from 'discordeno'
import { separateOverwrites } from 'discordeno'
/** Create a copy of a channel */
export async function cloneChannel (

View File

@@ -1,4 +1,4 @@
import type { BigString, Bot, Member } from '@discordeno/bot'
import type { BigString, Bot, Member } from 'discordeno'
/** Kicks a member from a voice channel */
export async function disconnectMember (

View File

@@ -1,4 +1,4 @@
import type { BigString, Collection, Member } from '@discordeno/bot'
import type { BigString, Collection, Member } from 'discordeno'
import type { BotWithCache } from '../../cache/src/addCacheCollections.js'
/** Fetch members for an entire guild then return the entire guilds cached members. */

View File

@@ -4,8 +4,8 @@ import type {
DiscordMemberWithUser,
ListGuildMembers,
Member
} from '@discordeno/bot'
import { Collection } from '@discordeno/bot'
} from 'discordeno'
import { Collection } from 'discordeno'
/**
* Highly recommended to **NOT** use this function to get members instead use fetchMembers().

View File

@@ -1,4 +1,4 @@
import type { BigString, Bot, Member } from '@discordeno/bot'
import type { BigString, Bot, Member } from 'discordeno'
/**
* Move a member from a voice channel to another.

View File

@@ -2,8 +2,8 @@ import type {
ApplicationCommandOptionChoice,
BigString,
Bot
} from '@discordeno/bot'
import { InteractionResponseTypes } from '@discordeno/bot'
} from 'discordeno'
import { InteractionResponseTypes } from 'discordeno'
export async function sendAutocompleteChoices (
bot: Bot,

View File

@@ -1,5 +1,5 @@
import type { BigString, Bot, CreateMessage, Message } from '@discordeno/bot'
import { Collection } from '@discordeno/bot'
import type { BigString, Bot, CreateMessage, Message } from 'discordeno'
import { Collection } from 'discordeno'
/** Maps the <userId, channelId> for dm channels */
export const dmChannelIds = new Collection<BigString, BigString>()

View File

@@ -1,4 +1,4 @@
import type { BigString, Bot, InteractionResponse } from '@discordeno/bot'
import type { BigString, Bot, InteractionResponse } from 'discordeno'
/** sendInteractionResponse with ephemeral reply */
export async function sendPrivateInteractionResponse (

View File

@@ -1,4 +1,4 @@
import type { BigString, Bot, CreateMessage, Message } from '@discordeno/bot'
import type { BigString, Bot, CreateMessage, Message } from 'discordeno'
/** Sends a text message. */
export async function sendTextMessage (

View File

@@ -1,4 +1,4 @@
import type { BigString, Bot, DiscordMessage, Message } from '@discordeno/bot'
import type { BigString, Bot, DiscordMessage, Message } from 'discordeno'
/** Suppress all the embeds in this message */
export async function suppressEmbeds (

View File

@@ -1,4 +1,4 @@
import type { BigString, Bot, Channel, DiscordChannel } from '@discordeno/bot'
import type { BigString, Bot, Channel, DiscordChannel } from 'discordeno'
/** Sets a thread channel to be archived. */
export async function archiveThread (

View File

@@ -1,7 +1,7 @@
{
"entryPointStrategy": "packages",
"entryPoints": [
"packages/bot",
"packages/client",
"packages/discordeno",
"packages/gateway",
"packages/logger",

View File

@@ -21,37 +21,10 @@ __metadata:
languageName: node
linkType: hard
"@discordeno/bot@18.0.0-alpha.1, @discordeno/bot@workspace:packages/bot":
version: 0.0.0-use.local
resolution: "@discordeno/bot@workspace:packages/bot"
dependencies:
"@discordeno/gateway": 18.0.0-alpha.1
"@discordeno/rest": 18.0.0-alpha.1
"@discordeno/types": 18.0.0-alpha.1
"@discordeno/utils": 18.0.0-alpha.1
"@swc/cli": ^0.1.57
"@swc/core": ^1.3.21
"@types/chai": ^4
"@types/mocha": ^10
"@types/node": ^18.11.9
"@types/sinon": ^10.0.13
c8: ^7.12.0
chai: ^4.3.7
eslint: ^8.0.1
eslint-config-discordeno: "*"
mocha: ^10.1.0
shx: ^0.3.4
sinon: ^15.0.0
tsconfig: "*"
typescript: ^4.9.3
languageName: unknown
linkType: soft
"@discordeno/cache-plugin@workspace:packages/plugins/cache":
version: 0.0.0-use.local
resolution: "@discordeno/cache-plugin@workspace:packages/plugins/cache"
dependencies:
"@discordeno/bot": 18.0.0-alpha.1
"@discordeno/gateway": 18.0.0-alpha.1
"@swc/cli": ^0.1.57
"@swc/core": ^1.3.21
@@ -61,6 +34,7 @@ __metadata:
"@types/sinon": ^10.0.13
c8: ^7.12.0
chai: ^4.3.7
discordeno: 18.0.0-alpha.1
eslint: ^8.0.1
eslint-config-discordeno: "*"
mocha: ^10.1.0
@@ -141,7 +115,7 @@ __metadata:
languageName: unknown
linkType: soft
"@discordeno/logger@18.0.0-alpha.1, @discordeno/logger@workspace:packages/logger":
"@discordeno/logger@workspace:packages/logger":
version: 0.0.0-use.local
resolution: "@discordeno/logger@workspace:packages/logger"
dependencies:
@@ -208,7 +182,6 @@ __metadata:
version: 0.0.0-use.local
resolution: "@discordeno/utils-plugin@workspace:packages/plugins/utils"
dependencies:
"@discordeno/bot": 18.0.0-alpha.1
"@swc/cli": ^0.1.57
"@swc/core": ^1.3.21
"@types/chai": ^4
@@ -217,6 +190,7 @@ __metadata:
"@types/sinon": ^10.0.13
c8: ^7.12.0
chai: ^4.3.7
discordeno: 18.0.0-alpha.1
eslint: ^8.0.1
eslint-config-discordeno: "*"
mocha: ^10.1.0
@@ -4034,27 +4008,6 @@ __metadata:
languageName: node
linkType: hard
"tester@workspace:packages/tester":
version: 0.0.0-use.local
resolution: "tester@workspace:packages/tester"
dependencies:
"@discordeno/logger": 18.0.0-alpha.1
"@swc/cli": ^0.1.57
"@swc/core": ^1.3.21
"@types/chai": ^4
"@types/mocha": ^10
"@types/node": ^18.11.9
"@types/sinon": ^10.0.13
chalk: ^5.1.2
discordeno: 18.0.0-alpha.1
eslint: ^8.0.1
eslint-config-discordeno: "*"
ts-node: ^10.9.1
tsconfig: "*"
typescript: ^4.9.3
languageName: unknown
linkType: soft
"text-table@npm:^0.2.0":
version: 0.2.0
resolution: "text-table@npm:0.2.0"