Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uses old apis? #19

Open
yavko opened this issue May 4, 2022 · 0 comments
Open

Uses old apis? #19

yavko opened this issue May 4, 2022 · 0 comments

Comments

@yavko
Copy link

yavko commented May 4, 2022

Hi I'm new to discordeno and wanted to try it out using deploy, so I came here, deploy has a new ui so the setup process is completely different though thats not the point of this issue, after I set it up I noticed it couldn't deploy because of type errors about a missing export, so I tried the version of discordeno around the last commit was made, well that didn't work either anyways here are the errors.

with v13 rc18
error: TS2345 [ERROR]: Argument of type 'bigint' is not assignable to parameter of type 'Bot'.
          snowflakeToBigint(iconUrl.id),
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/utils/Embed.ts:73:11

TS2345 [ERROR]: Argument of type 'bigint' is not assignable to parameter of type 'Bot'.
          snowflakeToBigint(url.id),
          ~~~~~~~~~~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/utils/Embed.ts:141:11

TS2724 [ERROR]: '"file:///home/yavor/tools/deps.ts"' has no exported member named 'DiscordApplicationCommandOptionTypes'. Did you mean 'DiscordenoApplicationCommandOption'?
import { DiscordApplicationCommandOptionTypes } from "../../../deps.ts";
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/commands/general/avatar.ts:1:10

TS2724 [ERROR]: '"file:///home/yavor/tools/deps.ts"' has no exported member named 'setApplicationId'. Did you mean 'getApplicationInfo'?
  setApplicationId,
  ~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/utils/redeploy.ts:5:3

    'getApplicationInfo' is declared here.
    export async function getApplicationInfo(bot: Bot) {
                          ~~~~~~~~~~~~~~~~~~
        at https://deno.land/x/discordeno@13.0.0-rc18/src/helpers/oauth/getApplicationInfo.ts:5:23

TS2724 [ERROR]: '"file:///home/yavor/tools/deps.ts"' has no exported member named 'setApplicationId'. Did you mean 'getApplicationInfo'?
  setApplicationId,
  ~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/utils/redeploy.ts:5:3

    'getApplicationInfo' is declared here.
    export async function getApplicationInfo(bot: Bot) {
                          ~~~~~~~~~~~~~~~~~~
        at https://deno.land/x/discordeno@13.0.0-rc18/src/helpers/oauth/getApplicationInfo.ts:5:23

TS2305 [ERROR]: Module '"file:///home/yavor/tools/deps.ts"' has no exported member 'upsertSlashCommands'.
  upsertSlashCommands,
  ~~~~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/utils/redeploy.ts:6:3

TS2724 [ERROR]: '"file:///home/yavor/tools/deps.ts"' has no exported member named 'DiscordApplicationCommandOptionTypes'. Did you mean 'DiscordenoApplicationCommandOption'?
import { DiscordApplicationCommandOptionTypes } from "../../../deps.ts";
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/commands/general/language.ts:1:10

TS2305 [ERROR]: Module '"file:///home/yavor/tools/deps.ts"' has no exported member 'validatePermissions'.
import { Interaction, validatePermissions } from "../../deps.ts";
                      ~~~~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/utils/permissionLevels.ts:1:23

TS2554 [ERROR]: Expected 4 arguments, but got 3.
  await sendWebhook(snowflakeToBigint(id), token, {
        ^
    at file:///home/yavor/tools/src/utils/logWebhook.ts:22:9

    An argument for 'options' was not provided.
    export async function sendWebhook(bot: Bot, webhookId: bigint, webhookToken: string, options: ExecuteWebhook) {
                                                                                         ~~~~~~~~~~~~~~~~~~~~~~~
        at https://deno.land/x/discordeno@13.0.0-rc18/src/helpers/webhooks/sendWebhook.ts:7:86

TS2305 [ERROR]: Module '"file:///home/yavor/tools/deps.ts"' has no exported member 'camelize'.
  camelize,
  ~~~~~~~~
    at file:///home/yavor/tools/mod.ts:2:3

TS2724 [ERROR]: '"file:///home/yavor/tools/deps.ts"' has no exported member named 'DiscordInteractionResponseTypes'. Did you mean 'DiscordenoInteractionResponse'?
  DiscordInteractionResponseTypes,
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/mod.ts:3:3

TS2305 [ERROR]: Module '"file:///home/yavor/tools/deps.ts"' has no exported member 'verifySignature'.
  verifySignature,
  ~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/mod.ts:10:3

Found 12 errors.
with latest
error: TS2345 [ERROR]: Argument of type 'bigint' is not assignable to parameter of type 'string'.
    return { content: translate(payload.guildId!, "PING_RESPONSE") };
                                ~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/commands/general/ping.ts:7:33

TS2305 [ERROR]: Module '"file:///home/yavor/tools/deps.ts"' has no exported member 'EmbedAuthor'.
  EmbedAuthor,
  ~~~~~~~~~~~
    at file:///home/yavor/tools/src/utils/Embed.ts:3:3

TS2305 [ERROR]: Module '"file:///home/yavor/tools/deps.ts"' has no exported member 'EmbedField'.
  EmbedField,
  ~~~~~~~~~~
    at file:///home/yavor/tools/src/utils/Embed.ts:4:3

TS2305 [ERROR]: Module '"file:///home/yavor/tools/deps.ts"' has no exported member 'EmbedFooter'.
  EmbedFooter,
  ~~~~~~~~~~~
    at file:///home/yavor/tools/src/utils/Embed.ts:5:3

TS2305 [ERROR]: Module '"file:///home/yavor/tools/deps.ts"' has no exported member 'EmbedImage'.
  EmbedImage,
  ~~~~~~~~~~
    at file:///home/yavor/tools/src/utils/Embed.ts:6:3

TS2345 [ERROR]: Argument of type 'bigint' is not assignable to parameter of type 'Bot'.
          snowflakeToBigint(iconUrl.id),
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/utils/Embed.ts:73:11

TS2345 [ERROR]: Argument of type 'bigint' is not assignable to parameter of type 'string'.
          snowflakeToBigint(iconUrl.id),
                            ~~~~~~~~~~
    at file:///home/yavor/tools/src/utils/Embed.ts:73:29

TS2345 [ERROR]: Argument of type 'bigint' is not assignable to parameter of type 'Bot'.
          snowflakeToBigint(url.id),
          ~~~~~~~~~~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/utils/Embed.ts:141:11

TS2345 [ERROR]: Argument of type 'bigint' is not assignable to parameter of type 'string'.
          snowflakeToBigint(url.id),
                            ~~~~~~
    at file:///home/yavor/tools/src/utils/Embed.ts:141:29

TS2724 [ERROR]: '"file:///home/yavor/tools/deps.ts"' has no exported member named 'DiscordApplicationCommandOptionTypes'. Did you mean 'DiscordApplicationCommandOptionChoice'?
import { DiscordApplicationCommandOptionTypes } from "../../../deps.ts";
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/commands/general/avatar.ts:1:10

TS2322 [ERROR]: Type '(payload: Interaction) => { content: string; embeds?: undefined; } | { embeds: Embed[]; content?: undefined; }' is not assignable to type '(payload: Interaction) => InteractionResponse | InteractionApplicationCommandCallbackData | Promise<...>'.
  Type '{ content: string; embeds?: undefined; } | { embeds: Embed[]; content?: undefined; }' is not assignable to type 'InteractionResponse | InteractionApplicationCommandCallbackData | Promise<InteractionResponse | InteractionApplicationCommandCallbackData>'.
    Type '{ embeds: Embed[]; content?: undefined; }' is not assignable to type 'InteractionResponse | InteractionApplicationCommandCallbackData | Promise<InteractionResponse | InteractionApplicationCommandCallbackData>'.
      Type '{ embeds: Embed[]; content?: undefined; }' is not assignable to type 'InteractionApplicationCommandCallbackData'.
        Types of property 'embeds' are incompatible.
          Type 'import("file:///home/yavor/tools/src/utils/Embed.ts").Embed[]' is not assignable to type 'import("https://deno.land/x/discordeno@13.0.0-rc35/transformers/embed.ts").Embed[]'.
            Type 'import("file:///home/yavor/tools/src/utils/Embed.ts").Embed' is not assignable to type 'import("https://deno.land/x/discordeno@13.0.0-rc35/transformers/embed.ts").Embed'.
              Types of property 'timestamp' are incompatible.
                Type 'string | undefined' is not assignable to type 'number | undefined'.
                  Type 'string' is not assignable to type 'number'.
  execute: function (payload) {
  ~~~~~~~
    at file:///home/yavor/tools/src/commands/general/avatar.ts:16:3

    The expected type comes from property 'execute' which is declared here on type 'Command'
      execute: (
      ~~~~~~~
        at file:///home/yavor/tools/src/commands/mod.ts:36:3

TS7053 [ERROR]: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Collection<bigint, User>'.
  No index signature with a parameter of type 'string' was found on type 'Collection<bigint, User>'.
    const targetUser = payload.data?.resolved?.users?.[userId] ||
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/commands/general/avatar.ts:19:24

TS2339 [ERROR]: Property 'user' does not exist on type '{ avatar?: bigint | undefined; permissions?: bigint | undefined; nick?: string | undefined; premiumSince?: number | undefined; communicationDisabledUntil?: number | undefined; id: bigint; guildId: bigint; roles: bigint[]; toggles: { ...; }; joinedAt: number; }'.
      payload.member?.user || payload.user!;
                      ~~~~
    at file:///home/yavor/tools/src/commands/general/avatar.ts:20:23

TS2345 [ERROR]: Argument of type 'bigint' is not assignable to parameter of type 'string'.
        return { content: translate(payload.guildId!, "MISSING_MEMBER") };
                                    ~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/commands/general/avatar.ts:29:37

TS2345 [ERROR]: Argument of type 'bigint' is not assignable to parameter of type 'string'.
      return { content: translate(payload.guildId!, "MISSING_MEMBER") };
                                  ~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/commands/general/avatar.ts:36:35

TS2724 [ERROR]: '"file:///home/yavor/tools/deps.ts"' has no exported member named 'setApplicationId'. Did you mean 'getApplicationInfo'?
  setApplicationId,
  ~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/utils/redeploy.ts:5:3

    'getApplicationInfo' is declared here.
    export async function getApplicationInfo(bot: Bot) {
                          ~~~~~~~~~~~~~~~~~~
        at https://deno.land/x/discordeno@13.0.0-rc35/helpers/oauth/getApplicationInfo.ts:5:23

TS2724 [ERROR]: '"file:///home/yavor/tools/deps.ts"' has no exported member named 'setApplicationId'. Did you mean 'getApplicationInfo'?
  setApplicationId,
  ~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/utils/redeploy.ts:5:3

    'getApplicationInfo' is declared here.
    export async function getApplicationInfo(bot: Bot) {
                          ~~~~~~~~~~~~~~~~~~
        at https://deno.land/x/discordeno@13.0.0-rc35/helpers/oauth/getApplicationInfo.ts:5:23

TS2305 [ERROR]: Module '"file:///home/yavor/tools/deps.ts"' has no exported member 'upsertSlashCommands'.
  upsertSlashCommands,
  ~~~~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/utils/redeploy.ts:6:3

TS2724 [ERROR]: '"file:///home/yavor/tools/deps.ts"' has no exported member named 'DiscordApplicationCommandOptionTypes'. Did you mean 'DiscordApplicationCommandOptionChoice'?
import { DiscordApplicationCommandOptionTypes } from "../../../deps.ts";
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/commands/general/language.ts:1:10

TS2345 [ERROR]: Argument of type 'bigint' is not assignable to parameter of type 'string'.
      return { content: translate(payload.guildId!, "LANGUAGE_MISSING_KEY") };
                                  ~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/commands/general/language.ts:21:35

TS2345 [ERROR]: Argument of type 'bigint' is not assignable to parameter of type 'string'.
          payload.guildId!,
          ~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/commands/general/language.ts:27:11

TS2345 [ERROR]: Argument of type 'bigint' is not assignable to parameter of type 'string'.
    await updateGuildCommands(payload.guildId!);
                              ~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/commands/general/language.ts:35:31

TS2345 [ERROR]: Argument of type 'bigint' is not assignable to parameter of type 'string'.
      content: translate(payload.guildId!, "LANGUAGE_UPDATED"),
                         ~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/commands/general/language.ts:38:26

TS2305 [ERROR]: Module '"file:///home/yavor/tools/deps.ts"' has no exported member 'validatePermissions'.
import { Interaction, validatePermissions } from "../../deps.ts";
                      ~~~~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/utils/permissionLevels.ts:1:23

TS2339 [ERROR]: Property 'user' does not exist on type '{ avatar?: bigint | undefined; permissions?: bigint | undefined; nick?: string | undefined; premiumSince?: number | undefined; communicationDisabledUntil?: number | undefined; id: bigint; guildId: bigint; roles: bigint[]; toggles: { ...; }; joinedAt: number; }'.
  BOT_OWNERS: (payload) => [""].includes(payload.member?.user.id || payload.user?.id!),
                                                         ~~~~
    at file:///home/yavor/tools/src/utils/permissionLevels.ts:34:58

TS2339 [ERROR]: Property 'user' does not exist on type '{ avatar?: bigint | undefined; permissions?: bigint | undefined; nick?: string | undefined; premiumSince?: number | undefined; communicationDisabledUntil?: number | undefined; id: bigint; guildId: bigint; roles: bigint[]; toggles: { ...; }; joinedAt: number; }'.
  const user = payload.member?.user || payload.user!;
                               ~~~~
    at file:///home/yavor/tools/src/utils/logWebhook.ts:13:32

TS2345 [ERROR]: Argument of type 'bigint | "Channel ID unavailable"' is not assignable to parameter of type 'string'.
  Type 'bigint' is not assignable to type 'string'.
    ).addField("Channel", payload.channelId || "Channel ID unavailable", true)
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/utils/logWebhook.ts:19:27

TS2345 [ERROR]: Argument of type 'bigint | "Guild ID unavailable"' is not assignable to parameter of type 'string'.
  Type 'bigint' is not assignable to type 'string'.
    .addField("Guild", payload.guildId || "Guild ID unavailable", true);
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/src/utils/logWebhook.ts:20:24

TS2554 [ERROR]: Expected 4 arguments, but got 3.
  await sendWebhook(snowflakeToBigint(id), token, {
        ^
    at file:///home/yavor/tools/src/utils/logWebhook.ts:22:9

    An argument for 'options' was not provided.
    export async function sendWebhook(bot: Bot, webhookId: bigint, webhookToken: string, options: ExecuteWebhook) {
                                                                                         ~~~~~~~~~~~~~~~~~~~~~~~
        at https://deno.land/x/discordeno@13.0.0-rc35/helpers/webhooks/sendWebhook.ts:7:86

TS2724 [ERROR]: '"file:///home/yavor/tools/deps.ts"' has no exported member named 'camelize'. Did you mean 'Camelize'?
  camelize,
  ~~~~~~~~
    at file:///home/yavor/tools/mod.ts:2:3

TS2305 [ERROR]: Module '"file:///home/yavor/tools/deps.ts"' has no exported member 'DiscordInteractionResponseTypes'.
  DiscordInteractionResponseTypes,
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at file:///home/yavor/tools/mod.ts:3:3

Found 31 errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant