Code Monkey home page Code Monkey logo

discordbot-shiro's Introduction

Discordbot-Shiro

DiscordBot WiP with JavaScript powered by Node.JS

Verified by Discord

MIT Licence

Live test and support in: https://discord.gg/pGbbcgV

Discordbot-Shiro


Current commands

General

  • Bitcoin : Posts current price of bitcoin
  • Help : Posts help message with list of commands
  • Info: Info message
  • Ping : Ping -> Pong
  • Suggest: Sends suggested feature for bot owner
  • UrbanDict: Searches given word from urbandictionary

Fun

  • Bored: Posts activity to fight boredom
  • Dog : Posts awesome dog 🐶
  • Fox : Posts awesome fox 🦊
  • Meme: Posts spicy meme 👌
  • Rule34: Posts lewd image from rule34.xxx 💦
  • Shibe : Posts awesome shibe 🐕
  • Smug: Posts smug anime girl :^)

Owner tools

  • Activity: Sets bot Activity
  • Guilds: Posts guilds count and posts it to top.gg bot page
  • Load: Loads a command
  • Picture: Sets bot profile picture from url
  • Purge: Purges a specified amount of messages
  • Reload: Reloads a command
  • Unload: Unloads a command

Planned commands

General

  • Anime Quote: Posts random anime quote
  • MyAnimeList: Posts MAL stats from user
  • Privatevc: Creates private voice chat
  • Steam: Posts steam and csgo server status
  • Userinfo: Gives info from given user (roles etc.)
  • Weather: Posts weather from given city

How to install & Run

Install required packages

npm install

Copy & Edit config.json

mv config.json.example config.json
config.json
  • token = Discord bot token
  • prefix = Command prefix
  • botOwnerID = Your Discord client id
  • topggBotAPIKey = API key for your bot at top.gg
  • topggBotID = bot ID at top.gg

Start the bot

npm start

Legacy version

Legacy version in tag legacy-version


Support

Reach out to me at one of the following places!


Licence

MIT Licence

discordbot-shiro's People

Contributors

dependabot[bot] avatar tatatofly avatar

Stargazers

 avatar

Watchers

 avatar

discordbot-shiro's Issues

Weather

Weather: Posts weather from given city

Meme

Meme: Posts spicy meme 👌

Altcoins

Altcoins current price in EUR/USD
ETH, LTC, etc.

BUG: DiscordAPIError: Missing Permissions

/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:298
      throw new DiscordAPIError(data, res.status, request);
            ^

DiscordAPIError: Missing Permissions
    at RequestHandler.execute (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:298:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:50:14)
    at async TextChannel.send (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:171:15) {
  method: 'post',
  path: '/channels/774027368041283635/messages',
  code: 50013,
  httpStatus: 403,
  requestData: {
    json: {
      content: undefined,
      tts: false,
      nonce: undefined,
      embeds: [
        {
          title: 'Discordbot-Shiro',
          type: 'rich',
          description: 'List of commands: ',
          url: 'https://github.com/Tatatofly/Discordbot-Shiro',
          timestamp: null,
          color: 9442302,
          fields: [
            [Object], [Object],
            [Object], [Object],
            [Object], [Object],
            [Object], [Object],
            [Object], [Object],
            [Object], [Object]
          ],
          thumbnail: {
            url: 'https://cdn.discordapp.com/app-icons/267636401573462016/03f3d357e36b57c8a95f719cb4fe0263.png?size=256',
            proxyURL: undefined,
            height: undefined,
            width: undefined
          },
          image: null,
          author: {
            name: 'Tatatofly#0854',
            url: 'https://tatu.moe',
            icon_url: 'http://files.tatu.moe/toplel.jpg'
          },
          footer: {
            text: 'Source in Github',
            icon_url: 'https://cdn.discordapp.com/app-icons/267636401573462016/03f3d357e36b57c8a95f719cb4fe0263.png?size=256'
          }
        }
      ],
      components: undefined,
      username: undefined,
      avatar_url: undefined,
      allowed_mentions: undefined,
      flags: undefined,
      message_reference: undefined,
      attachments: undefined,
      sticker_ids: undefined
    },
    files: []
  }
}

BUG: HTTPError [FetchError] - read ECONNRESET

/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:172
        throw new HTTPError(error.message, error.constructor.name, error.status, request);
HTTPError [FetchError]: request to https://discord.com/api/v9/channels/845395828872577056/messages failed, reason: read ECONNRESET
    at RequestHandler.execute (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:172:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:50:14)
    at async TextChannel.send (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:171:15) {
  code: 500,
  method: 'post',
  path: '/channels/845395828872577056/messages',
  requestData: {
    json: {
      content: undefined,
      tts: false,
      nonce: undefined,
      embeds: undefined,
      components: undefined,
      username: undefined,
      avatar_url: undefined,
      allowed_mentions: undefined,
      flags: undefined,
      message_reference: undefined,
      attachments: undefined,
      sticker_ids: undefined
    },
    files: [
      {
        attachment: 'https://random.dog/9b906030-b598-4647-8f34-d68014c195f2.jpg',
        name: '9b906030-b598-4647-8f34-d68014c195f2.jpg',
        file: PassThrough {
          _readableState: ReadableState {
            objectMode: false,
            highWaterMark: 16384,
            buffer: [BufferList],
            length: 0,
            pipes: [],
            flowing: true,
            ended: true,
            endEmitted: true,
            reading: false,
            constructed: true,
            sync: false,
            needReadable: false,
            emittedReadable: false,
            readableListening: false,
            resumeScheduled: false,
            errorEmitted: false,
            emitClose: true,
            autoDestroy: true,
            destroyed: true,
            errored: null,
            closed: true,
            closeEmitted: true,
            defaultEncoding: 'utf8',
            awaitDrainWriters: null,
            multiAwaitDrain: false,
            readingMore: false,
            dataEmitted: true,
            decoder: null,
            encoding: null,
            [Symbol(kPaused)]: false
          },
          _events: [Object: null prototype] {
            prefinish: [Function: prefinish],
            error: [Array],
            data: [Array]
          },
          _eventsCount: 3,
          _maxListeners: undefined,
          _writableState: WritableState {
            objectMode: false,
            highWaterMark: 16384,
            finalCalled: true,
            needDrain: false,
            ending: true,
            ended: true,
            finished: true,
            destroyed: true,
            decodeStrings: true,
            defaultEncoding: 'utf8',
            length: 0,
            writing: false,
            corked: 0,
            sync: false,
            bufferProcessing: false,
            onwrite: [Function: bound onwrite],
            writecb: null,
            writelen: 0,
            afterWriteTickInfo: null,
            buffered: [],
            bufferedIndex: 0,
            allBuffers: true,
            allNoop: true,
            pendingcb: 0,
            constructed: true,
            prefinished: true,
            errorEmitted: false,
            emitClose: true,
            autoDestroy: true,
            errored: null,
            closed: true,
            closeEmitted: true,
            [Symbol(kOnFinished)]: []
          },
          allowHalfOpen: true,
          emit: [Function (anonymous)],
          [Symbol(kCapture)]: false,
          [Symbol(kCallback)]: null
        }
      }
    ]
  }
}

BUG: HTTPError [FetchError]: request to https://discord.com/api/v9/channels/880066711162871838/messages failed, reason: read ECONNRESET

/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:172
throw new HTTPError(error.message, error.constructor.name, error.status, request);
^

HTTPError [FetchError]: request to https://discord.com/api/v9/channels/880066711162871838/messages failed, reason: read ECONNRESET
at RequestHandler.execute (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:172:15)
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:50:14)
at async TextChannel.send (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:171:15) {

  code: 500,
  method: 'post',
  path: '/channels/880066711162871838/messages',
  requestData: {
    json: {
      content: undefined,
      tts: false,
      nonce: undefined,
      embeds: undefined,
      components: undefined,
      username: undefined,
      avatar_url: undefined,
      allowed_mentions: undefined,
      flags: undefined,
      message_reference: undefined,
      attachments: undefined,
      sticker_ids: undefined
    },
    files: [
      {
        attachment: 'https://api-cdn.rule34.xxx/images/4419/5c330cbf000dc9e7e361d441b229c83f.jpeg',
        name: '5c330cbf000dc9e7e361d441b229c83f.jpeg',
        file: PassThrough {
          _readableState: ReadableState {
            objectMode: false,
            highWaterMark: 16384,
            buffer: [BufferList],
            length: 0,
            pipes: [],
            flowing: true,
            ended: false,
            endEmitted: false,
            reading: true,
            constructed: true,
            sync: false,
            needReadable: true,
            emittedReadable: false,
            readableListening: false,
            resumeScheduled: false,
            errorEmitted: false,
            emitClose: true,
            autoDestroy: true,
            destroyed: false,
            errored: null,
            closed: false,
            closeEmitted: false,
            defaultEncoding: 'utf8',
            awaitDrainWriters: null,
            multiAwaitDrain: false,
            readingMore: false,
            dataEmitted: true,
            decoder: null,
            encoding: null,
            [Symbol(kPaused)]: false
          },
          _events: [Object: null prototype] {
            prefinish: [Function: prefinish],
            unpipe: [Function: onunpipe],
            error: [Array],
            close: [Function],
            finish: [Function],
            data: [Array],
            drain: [Function: pipeOnDrainFunctionResult]
          },
          _eventsCount: 7,
          _maxListeners: undefined,
          _writableState: WritableState {
            objectMode: false,
            highWaterMark: 16384,
            finalCalled: false,
            needDrain: false,
            ending: false,
            ended: false,
            finished: false,
            destroyed: false,
            decodeStrings: true,
            defaultEncoding: 'utf8',
            length: 0,
            writing: false,
            corked: 0,
            sync: false,
            bufferProcessing: false,
            onwrite: [Function: bound onwrite],
            writecb: null,
            writelen: 0,
            afterWriteTickInfo: null,
            buffered: [],
            bufferedIndex: 0,
            allBuffers: true,
            allNoop: true,
            pendingcb: 0,
            constructed: true,
            prefinished: false,
            errorEmitted: false,
            emitClose: true,
            autoDestroy: true,
            errored: null,
            closed: false,
            closeEmitted: false,
            [Symbol(kOnFinished)]: []
          },
          allowHalfOpen: true,
          emit: [Function (anonymous)],
          [Symbol(kCapture)]: false,
          [Symbol(kCallback)]: null
        }
      }
    ]
  }
}

BUG: HTTPError [AbortError]: The user aborted a request.

HTTPError [AbortError]: The user aborted a request. at RequestHandler.execute (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:172:15) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async RequestHandler.push (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:50:14) at async TextChannel.send (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:171:15) { code: 500, method: 'post', path: '/channels/878970710503084035/messages', requestData: { json: { content: undefined, tts: false, nonce: undefined, embeds: undefined, components: undefined, username: undefined, avatar_url: undefined, allowed_mentions: undefined, flags: undefined, message_reference: undefined, attachments: undefined, sticker_ids: undefined }, files: [ { attachment: 'https://api-cdn.rule34.xxx/images/3454/30afec4e595d8d292363656d47aac0d1.jpeg', name: '30afec4e595d8d292363656d47aac0d1.jpeg', file: PassThrough { _readableState: ReadableState { objectMode: false, highWaterMark: 16384, buffer: [BufferList], length: 0, pipes: [], flowing: true, ended: false, endEmitted: false, reading: true, constructed: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, errorEmitted: false, emitClose: true, autoDestroy: true, destroyed: false, errored: null, closed: false, closeEmitted: false, defaultEncoding: 'utf8', awaitDrainWriters: null, multiAwaitDrain: false, readingMore: false, dataEmitted: true, decoder: null, encoding: null, [Symbol(kPaused)]: false }, _events: [Object: null prototype] { prefinish: [Function: prefinish], unpipe: [Function: onunpipe], error: [Array], close: [Function], finish: [Function], data: [Array], drain: [Function: pipeOnDrainFunctionResult] }, _eventsCount: 7, _maxListeners: undefined, _writableState: WritableState { objectMode: false, highWaterMark: 16384, finalCalled: false, needDrain: false, ending: false, ended: false, finished: false, destroyed: false, decodeStrings: true, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: false, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, afterWriteTickInfo: null, buffered: [], bufferedIndex: 0, allBuffers: true, allNoop: true, pendingcb: 0, constructed: true, prefinished: false, errorEmitted: false, emitClose: true, autoDestroy: true, errored: null, closed: false, closeEmitted: false, [Symbol(kOnFinished)]: [] }, allowHalfOpen: true, emit: [Function (anonymous)], [Symbol(kCapture)]: false, [Symbol(kCallback)]: null } } ] } }

BUG: DiscordAPIError: Request entity too large

/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:298
      throw new DiscordAPIError(data, res.status, request);
            ^

DiscordAPIError: Request entity too large
    at RequestHandler.execute (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:298:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:50:14)
    at async TextChannel.send (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:171:15) {
  method: 'post',
  path: '/channels/880860139622645823/messages',
  code: 40005,
  httpStatus: 413,
  requestData: {
    json: {
      content: undefined,
      tts: false,
      nonce: undefined,
      embeds: undefined,
      components: undefined,
      username: undefined,
      avatar_url: undefined,
      allowed_mentions: undefined,
      flags: undefined,
      message_reference: undefined,
      attachments: undefined,
      sticker_ids: undefined
    },
    files: [
      {
        attachment: 'https://random.dog/74832f72-1f1d-471b-a171-781b5c9391a6.gif',
        name: '74832f72-1f1d-471b-a171-781b5c9391a6.gif',
        file: PassThrough {
          _readableState: ReadableState {
            objectMode: false,
            highWaterMark: 16384,
            buffer: [BufferList],
            length: 0,
            pipes: [],
            flowing: true,
            ended: true,
            endEmitted: true,
            reading: false,
            constructed: true,
            sync: false,
            needReadable: false,
            emittedReadable: false,
            readableListening: false,
            resumeScheduled: false,
            errorEmitted: false,
            emitClose: true,
            autoDestroy: true,
            destroyed: true,
            errored: null,
            closed: true,
            closeEmitted: true,
            defaultEncoding: 'utf8',
            awaitDrainWriters: null,
            multiAwaitDrain: false,
            readingMore: false,
            dataEmitted: true,
            decoder: null,
            encoding: null,
            [Symbol(kPaused)]: false
          },
          _events: [Object: null prototype] {
            prefinish: [Function: prefinish],
            error: [Array],
            data: [Function: bound ]
          },
          _eventsCount: 3,
          _maxListeners: undefined,
          _writableState: WritableState {
            objectMode: false,
            highWaterMark: 16384,
            finalCalled: true,
            needDrain: false,
            ending: true,
            ended: true,
            finished: true,
            destroyed: true,
            decodeStrings: true,
            defaultEncoding: 'utf8',
            length: 0,
            writing: false,
            corked: 0,
            sync: false,
            bufferProcessing: false,
            onwrite: [Function: bound onwrite],
            writecb: null,
            writelen: 0,
            afterWriteTickInfo: null,
            buffered: [],
            bufferedIndex: 0,
            allBuffers: true,
            allNoop: true,
            pendingcb: 0,
            constructed: true,
            prefinished: true,
            errorEmitted: false,
            emitClose: true,
            autoDestroy: true,
            errored: null,
            closed: true,
            closeEmitted: true,
            [Symbol(kOnFinished)]: []
          },
          allowHalfOpen: true,
          emit: [Function (anonymous)],
          [Symbol(kCapture)]: false,
          [Symbol(kCallback)]: null
        }
      }
    ]
  }
}

Privatevc

Privatevc: Creates private voice chat

BUG: DiscordAPIError: Missing Permissions

/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:298
      throw new DiscordAPIError(data, res.status, request);
            ^

DiscordAPIError: Missing Permissions
    at RequestHandler.execute (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:298:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:50:14)
    at async TextChannel.send (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:171:15) {
  method: 'post',
  path: '/channels/450452065395671093/messages',
  code: 50013,
  httpStatus: 403,
  requestData: {
    json: {
      content: undefined,
      tts: false,
      nonce: undefined,
      embeds: [
        {
          title: 'Discordbot-Shiro',
          type: 'rich',
          description: 'List of commands: ',
          url: 'https://github.com/Tatatofly/Discordbot-Shiro',
          timestamp: null,
          color: 9442302,
          fields: [
            [Object], [Object],
            [Object], [Object],
            [Object], [Object],
            [Object], [Object],
            [Object], [Object],
            [Object], [Object],
            [Object]
          ],
          thumbnail: {
            url: 'https://cdn.discordapp.com/app-icons/267636401573462016/03f3d357e36b57c8a95f719cb4fe0263.png?size=256',
            proxyURL: undefined,
            height: undefined,
            width: undefined
          },
          image: null,
          author: {
            name: 'Tatatofly#0854',
            url: 'https://tatu.moe',
            icon_url: 'http://files.tatu.moe/toplel.jpg'
          },
          footer: {
            text: 'Source in Github',
            icon_url: 'https://cdn.discordapp.com/app-icons/267636401573462016/03f3d357e36b57c8a95f719cb4fe0263.png?size=256'
          }
        }
      ],
      components: undefined,
      username: undefined,
      avatar_url: undefined,
      allowed_mentions: undefined,
      flags: undefined,
      message_reference: undefined,
      attachments: undefined,
      sticker_ids: undefined
    },
    files: []
  }
}

Dynamic s!help text

Dynamic s!help text so commands have defined text inside files and s!help command is generated dynamic

BUG: DiscordAPIError: Missing Permissions

/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:298
      throw new DiscordAPIError(data, res.status, request);
            ^

DiscordAPIError: Missing Permissions
    at RequestHandler.execute (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:298:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:50:14)
    at async TextChannel.send (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:171:15) {
  method: 'post',
  path: '/channels/774027368041283635/messages',
  code: 50013,
  httpStatus: 403,
  requestData: {
    json: {
      content: undefined,
      tts: false,
      nonce: undefined,
      embeds: [
        {
          title: 'Discordbot-Shiro',
          type: 'rich',
          description: 'List of commands: ',
          url: 'https://github.com/Tatatofly/Discordbot-Shiro',
          timestamp: null,
          color: 9442302,
          fields: [
            [Object], [Object],
            [Object], [Object],
            [Object], [Object],
            [Object], [Object],
            [Object], [Object],
            [Object], [Object],
            [Object]
          ],
          thumbnail: {
            url: 'https://cdn.discordapp.com/app-icons/267636401573462016/03f3d357e36b57c8a95f719cb4fe0263.png?size=256',
            proxyURL: undefined,
            height: undefined,
            width: undefined
          },
          image: null,
          author: {
            name: 'Tatatofly#0854',
            url: 'https://tatu.moe',
            icon_url: 'http://files.tatu.moe/toplel.jpg'
          },
          footer: {
            text: 'Source in Github',
            icon_url: 'https://cdn.discordapp.com/app-icons/267636401573462016/03f3d357e36b57c8a95f719cb4fe0263.png?size=256'
          }
        }
      ],
      components: undefined,
      username: undefined,
      avatar_url: undefined,
      allowed_mentions: undefined,
      flags: undefined,
      message_reference: undefined,
      attachments: undefined,
      sticker_ids: undefined
    },
    files: []
  }
}

BUG: TypeError: Cannot read properties of undefined (reading 'cache')

/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/client/actions/MessageCreate.js:13
      const existing = channel.messages.cache.get(data.id);
                                        ^

TypeError: Cannot read properties of undefined (reading 'cache')
    at MessageCreateAction.handle (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/client/actions/MessageCreate.js:13:41)
    at Object.module.exports [as MESSAGE_CREATE] (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/client/websocket/WebSocketManager.js:345:31)
    at WebSocketShard.onPacket (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/client/websocket/WebSocketShard.js:443:22)
    at WebSocketShard.onMessage (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/client/websocket/WebSocketShard.js:300:10)
    at WebSocket.onMessage (/home/tatu/Discordbot-Shiro/node_modules/ws/lib/event-target.js:132:16)
    at WebSocket.emit (node:events:390:28)
    at Receiver.receiverOnMessage (/home/tatu/Discordbot-Shiro/node_modules/ws/lib/websocket.js:970:20)
    at Receiver.emit (node:events:390:28)
    at Receiver.dataMessage (/home/tatu/Discordbot-Shiro/node_modules/ws/lib/receiver.js:517:14)

BUG: DiscordAPIError: 404: Not Found /channels

/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:298
      throw new DiscordAPIError(data, res.status, request);
            ^

DiscordAPIError: 404: Not Found
    at RequestHandler.execute (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:298:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:50:14)
    at async ChannelManager.fetch (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/managers/ChannelManager.js:114:18) {
  method: 'get',
  path: '/channels',
  code: 0,
  httpStatus: 404,
  requestData: { json: undefined, files: [] }
}

Node.js v17.1.0
tatu@tatultawordpress:~/Discordbot-Shiro$ node bot.js
Logged in as Shiro#8963!
/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/client/actions/MessageCreate.js:13
      const existing = channel.messages.cache.get(data.id);
                                        ^

TypeError: Cannot read properties of undefined (reading 'cache')
    at MessageCreateAction.handle (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/client/actions/MessageCreate.js:13:41)
    at Object.module.exports [as MESSAGE_CREATE] (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/client/websocket/WebSocketManager.js:345:31)
    at WebSocketShard.onPacket (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/client/websocket/WebSocketShard.js:443:22)
    at WebSocketShard.onMessage (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/client/websocket/WebSocketShard.js:300:10)
    at WebSocket.onMessage (/home/tatu/Discordbot-Shiro/node_modules/ws/lib/event-target.js:132:16)
    at WebSocket.emit (node:events:390:28)
    at Receiver.receiverOnMessage (/home/tatu/Discordbot-Shiro/node_modules/ws/lib/websocket.js:970:20)
    at Receiver.emit (node:events:390:28)
    at Receiver.dataMessage (/home/tatu/Discordbot-Shiro/node_modules/ws/lib/receiver.js:517:14)

Node.js v17.1.0

Userinfo

Userinfo: Gives info from given user (roles etc.)

BUG: HTTPError [FetchError]: request to https://discord.com/api/v9/channels/898274943857459211/messages failed, reason: read ECONNRESET

/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:172
        throw new HTTPError(error.message, error.constructor.name, error.status, request);
              ^

HTTPError [FetchError]: request to https://discord.com/api/v9/channels/898274943857459211/messages failed, reason: read ECONNRESET
    at RequestHandler.execute (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:172:15)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:50:14)
    at async TextChannel.send (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:171:15) {
  code: 500,
  method: 'post',
  path: '/channels/898274943857459211/messages',
  requestData: {
    json: {
      content: undefined,
      tts: false,
      nonce: undefined,
      embeds: undefined,
      components: undefined,
      username: undefined,
      avatar_url: undefined,
      allowed_mentions: undefined,
      flags: undefined,
      message_reference: undefined,
      attachments: undefined,
      sticker_ids: undefined
    },
    files: [
      {
        attachment: 'https://api-cdn-mp4.rule34.xxx/images/4462/be902d2aa47c356f74e3c0c0cf004cc3.mp4',
        name: 'be902d2aa47c356f74e3c0c0cf004cc3.mp4',
        file: PassThrough {
          _readableState: ReadableState {
            objectMode: false,
            highWaterMark: 16384,
            buffer: [BufferList],
            length: 0,
            pipes: [],
            flowing: true,
            ended: false,
            endEmitted: false,
            reading: true,
            constructed: true,
            sync: false,
            needReadable: true,
            emittedReadable: false,
            readableListening: false,
            resumeScheduled: false,
            errorEmitted: false,
            emitClose: true,
            autoDestroy: true,
            destroyed: false,
            errored: null,
            closed: false,
            closeEmitted: false,
            defaultEncoding: 'utf8',
            awaitDrainWriters: null,
            multiAwaitDrain: false,
            readingMore: false,
            dataEmitted: true,
            decoder: null,
            encoding: null,
            [Symbol(kPaused)]: false
          },
          _events: [Object: null prototype] {
            prefinish: [Function: prefinish],
            unpipe: [Function: onunpipe],
            error: [Array],
            close: [Function],
            finish: [Function],
            drain: [Function: pipeOnDrainFunctionResult],
            data: [Array]
          },
          _eventsCount: 7,
          _maxListeners: undefined,
          _writableState: WritableState {
            objectMode: false,
            highWaterMark: 16384,
            finalCalled: false,
            needDrain: false,
            ending: false,
            ended: false,
            finished: false,
            destroyed: false,
            decodeStrings: true,
            defaultEncoding: 'utf8',
            length: 0,
            writing: false,
            corked: 0,
            sync: false,
            bufferProcessing: false,
            onwrite: [Function: bound onwrite],
            writecb: null,
            writelen: 0,
            afterWriteTickInfo: null,
            buffered: [],
            bufferedIndex: 0,
            allBuffers: true,
            allNoop: true,
            pendingcb: 0,
            constructed: true,
            prefinished: false,
            errorEmitted: false,
            emitClose: true,
            autoDestroy: true,
            errored: null,
            closed: false,
            closeEmitted: false,
            [Symbol(kOnFinished)]: []
          },
          allowHalfOpen: true,
          emit: [Function (anonymous)],
          [Symbol(kCapture)]: false,
          [Symbol(kCallback)]: null
        }
      }
    ]
  }
}

Tweet

Module for Tweeting things

BUG: DiscordAPIError: 404: Not Found

/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:298
      throw new DiscordAPIError(data, res.status, request);
            ^

DiscordAPIError: 404: Not Found
    at RequestHandler.execute (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:298:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:50:14)
    at async ChannelManager.fetch (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/managers/ChannelManager.js:114:18) {
  method: 'get',
  path: '/channels',
  code: 0,
  httpStatus: 404,
  requestData: { json: undefined, files: [] }
}

BUG: TypeError [ERR_UNESCAPED_CHARACTERS]: Request path contains unescaped characters

TypeError [ERR_UNESCAPED_CHARACTERS]: Request path contains unescaped characters
    at new NodeError (node:internal/errors:371:5)
    at new ClientRequest (node:_http_client:154:13)
    at request (node:https:353:10)
    at /home/tatu/Discordbot-Shiro/node_modules/node-fetch/lib/index.js:1438:15
    at new Promise (<anonymous>)
    at fetch (/home/tatu/Discordbot-Shiro/node_modules/node-fetch/lib/index.js:1407:9)
    at getAPI (/home/tatu/Discordbot-Shiro/commands/urbandictionary.js:7:28)
    at Object.execute (/home/tatu/Discordbot-Shiro/commands/urbandictionary.js:28:3)
    at Client.<anonymous> (/home/tatu/Discordbot-Shiro/bot.js:72:17)
    at Client.emit (node:events:394:28) {
  code: 'ERR_UNESCAPED_CHARACTERS'
}

Check bot privileges for commands

Check bot privileges for commands.

For example we need send embed permission to send help embed.
And send files when using rule34.

TypeError: Cannot read property 'send' of null

/home/tatu/Discordbot-Shiro/commands/meme.js:12
          message.channel.send({
                          ^

TypeError: Cannot read property 'send' of null
    at /home/tatu/Discordbot-Shiro/commands/meme.js:12:27
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

BUG: TypeError [ERR_UNESCAPED_CHARACTERS]: Request path contains unescaped characters

TypeError [ERR_UNESCAPED_CHARACTERS]: Request path contains unescaped characters
    at new NodeError (node:internal/errors:371:5)
    at new ClientRequest (node:_http_client:154:13)
    at request (node:https:353:10)
    at /home/tatu/Discordbot-Shiro/node_modules/node-fetch/lib/index.js:1438:15
    at new Promise (<anonymous>)
    at fetch (/home/tatu/Discordbot-Shiro/node_modules/node-fetch/lib/index.js:1407:9)
    at getLewd (/home/tatu/Discordbot-Shiro/commands/rule34.js:8:28)
    at Object.execute (/home/tatu/Discordbot-Shiro/commands/rule34.js:58:3)
    at Client.<anonymous> (/home/tatu/Discordbot-Shiro/bot.js:73:17)
    at Client.emit (node:events:394:28) {
  code: 'ERR_UNESCAPED_CHARACTERS'
}

BUG: FetchError: request to https://smug.moe/smg/11.png failed, reason: connect ETIMEDOUT

/home/tatu/Discordbot-Shiro/node_modules/node-fetch/lib/index.js:1461
                        reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
                               ^
FetchError: request to https://smug.moe/smg/11.png failed, reason: connect ETIMEDOUT 99.83.154.118:443
    at ClientRequest.<anonymous> (/home/tatu/Discordbot-Shiro/node_modules/node-fetch/lib/index.js:1461:11)
    at ClientRequest.emit (node:events:390:28)
    at TLSSocket.socketErrorListener (node:_http_client:447:9)
    at TLSSocket.emit (node:events:390:28)
    at emitErrorNT (node:internal/streams/destroy:164:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  type: 'system',
  errno: 'ETIMEDOUT',
  code: 'ETIMEDOUT'
}

Eli Smug.moe näyttäisi lopettaneen. Deprekoidaan ominaisuus kokonaan?

BUG: rule34 doesn't return anything if random file is too large

rule34 doesn't return anything if random file is too large.

(node:28453) UnhandledPromiseRejectionWarning: DiscordAPIError: Request entity too large at RequestHandler.execute (/home/7/tatatofly/github/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:170:25) at runMicrotasks (<anonymous>) at processTicksAndRejections (internal/process/task_queues.js:97:5) (node:28453) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 885)

Steam

Steam: Posts steam and csgo server status

Youtube

Plays music from youtube link

Info

Info: Info message

Suggest

Suggest: Saves suggested feature for bot owner

UrbanDict

UrbanDict: Searches given word from urbandictionary

BUG: HTTPError [FetchError]: request to https://discord.com/api/v9/channels/867827340712214538/messages failed, reason: read ECONNRESET

/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:172
        throw new HTTPError(error.message, error.constructor.name, error.status, request);
              ^

HTTPError [FetchError]: request to https://discord.com/api/v9/channels/867827340712214538/messages failed, reason: read ECONNRESET
    at RequestHandler.execute (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:172:15)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:50:14)
    at async TextChannel.send (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:171:15) {
  code: 500,
  method: 'post',
  path: '/channels/867827340712214538/messages',
  requestData: {
    json: {
      content: undefined,
      tts: false,
      nonce: undefined,
      embeds: undefined,
      components: undefined,
      username: undefined,
      avatar_url: undefined,
      allowed_mentions: undefined,
      flags: undefined,
      message_reference: undefined,
      attachments: undefined,
      sticker_ids: undefined
    },
    files: [
      {
        attachment: 'https://api-cdn.rule34.xxx/images/1410/6c85949caba20aebedd6e449c021078843258ac3.png',
        name: '6c85949caba20aebedd6e449c021078843258ac3.png',
        file: PassThrough {
          _readableState: ReadableState {
            objectMode: false,
            highWaterMark: 16384,
            buffer: [BufferList],
            length: 0,
            pipes: [],
            flowing: true,
            ended: false,
            endEmitted: false,
            reading: true,
            constructed: true,
            sync: false,
            needReadable: true,
            emittedReadable: false,
            readableListening: false,
            resumeScheduled: false,
            errorEmitted: false,
            emitClose: true,
            autoDestroy: true,
            destroyed: false,
            errored: null,
            closed: false,
            closeEmitted: false,
            defaultEncoding: 'utf8',
            awaitDrainWriters: null,
            multiAwaitDrain: false,
            readingMore: false,
            dataEmitted: true,
            decoder: null,
            encoding: null,
            [Symbol(kPaused)]: false
          },
          _events: [Object: null prototype] {
            prefinish: [Function: prefinish],
            unpipe: [Function: onunpipe],
            error: [Array],
            close: [Function],
            finish: [Function],
            data: [Array]
          },
          _eventsCount: 6,
          _maxListeners: undefined,
          _writableState: WritableState {
            objectMode: false,
            highWaterMark: 16384,
            finalCalled: false,
            needDrain: false,
            ending: false,
            ended: false,
            finished: false,
            destroyed: false,
            decodeStrings: true,
            defaultEncoding: 'utf8',
            length: 0,
            writing: false,
            corked: 0,
            sync: false,
            bufferProcessing: false,
            onwrite: [Function: bound onwrite],
            writecb: null,
            writelen: 0,
            afterWriteTickInfo: null,
            buffered: [],
            bufferedIndex: 0,
            allBuffers: true,
            allNoop: true,
            pendingcb: 0,
            constructed: true,
            prefinished: false,
            errorEmitted: false,
            emitClose: true,
            autoDestroy: true,
            errored: null,
            closed: false,
            closeEmitted: false,
            [Symbol(kOnFinished)]: []
          },
          allowHalfOpen: true,
          emit: [Function (anonymous)],
          [Symbol(kCapture)]: false,
          [Symbol(kCallback)]: null
        }
      }
    ]
  }
}

BUG: DiscordAPIError: Missing Access

/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:298
      throw new DiscordAPIError(data, res.status, request);
            ^

DiscordAPIError: Missing Access
    at RequestHandler.execute (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:298:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/rest/RequestHandler.js:50:14)
    at async TextChannel.sendTyping (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:190:5) {
  method: 'post',
  path: '/channels/883171937495416892/typing',
  code: 50001,
  httpStatus: 403,
  requestData: { json: undefined, files: [] }
}

Rule34

Rule34: Posts lewd image from rule34.xxx 💦

Picture

Picture: Sets bot profile picture from url

BUG: RangeError [MESSAGE_CONTENT_TYPE]: Message content must be a non-empty string.

`
/Discordbot-Shiro/node_modules/discord.js/src/util/Util.js:414
if (!allowEmpty && data.length === 0) throw new error(errorMessage);
^

RangeError [MESSAGE_CONTENT_TYPE]: Message content must be a non-empty string.
at Function.verifyString (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/util/Util.js:414:49)
at MessagePayload.makeContent (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/structures/MessagePayload.js:113:22)
at MessagePayload.resolveData (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/structures/MessagePayload.js:128:26)
at TextChannel.send (/home/tatu/Discordbot-Shiro/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:167:61)
at /home/tatu/Discordbot-Shiro/commands/suggest.js:13:34
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
[Symbol(code)]: 'MESSAGE_CONTENT_TYPE'
}

`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.