Bot not starting up due to "[ERROR]: 'type' is specified more than once"
See original GitHub issueDescribe the bug
So, i’ve created my own bot with Discordeno based from the template you have provided and customised it with my own liking. I’ve installed the newly released latest Deno Version, TypeScript and Discordeno version. However, when booting up the bot with the deno run --allow-read --unstable mod.ts
or without the --unstable
. I have ran into an error which resulted in:
ntmnathan:DenoBot ntmnathan$ deno run --allow-net --allow-read --unstable mod.ts
Compile file:///Users/ntmnathan/Documents/DenoBot/mod.ts
error: TS2783 [ERROR]: 'type' is specified more than once, so this usage will be overwritten.
type: options.type ? ChannelTypes[options.type] : undefined,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at https://raw.githubusercontent.com/Skillz4Killz/Discordeno/v1/structures/guild.ts:85:11
This spread always overwrites this property.
...options,
~~~~~~~~~~
at https://raw.githubusercontent.com/Skillz4Killz/Discordeno/v1/structures/guild.ts:93:11
I am not 100% sure if this is on my end or Discordeno’s. Any help appreciated.
To Reproduce Steps to reproduce the behaviour:
- Execute
deno run --allow-net --allow-read --unstable mod.ts
- Error above will be produced
Expected behaviour
If the deno
command above is executed in the bash console, it should make the bot authenticate with the API and go online.
Resources If you want me to add screenshots/code. Let me know, but its similar to Discordeno example.
Additional context None.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
@NTMNathan There was a small
/
typo in the avatarURL value but that is now fixed if you dodeno cache --reload mod.ts
it should fix itself.user.avatarURL()
=> Default settingsuser.avatarURL(2048)
=> Default image format with size of 2048user.avatarURL(2048, 'jpg')
=> JPG image format with size of 2048Discordeno provides you a
message.mentions
property which has all User objects for any users that were mentioned. So if for example you wanted to do a hug command you could doThis would use the first mentioned user or if none were provided it would use the message author itself.
As an example, I just pushed a simple avatar command showing both these in action: https://github.com/Skillz4Killz/Discordeno-bot-template/blob/master/src/commands/avatar.ts
Note: i am going to close this issue as the bug related to this issue has been closed, if you have any more questions or bugs feel free to open as many issues as you like
Sure, as of now, the bot started and commands work as expected.
Also I am having some problems (still learning as im new to Discordeno) with getting the Author/OtherUser Avatar URL and mentions:
Thanks again