GithubHelp home page GithubHelp logo

fhodun / testshoter Goto Github PK

View Code? Open in Web Editor NEW
14.0 3.0 13.0 99 KB

Discord bot that send content of questions on testportal

Home Page: https://testportal.pl

License: GNU General Public License v3.0

Shell 0.57% TypeScript 97.71% Batchfile 1.72%
discord testportal nodejs puppeteer discord-bot discordbot typescript polish

testshoter's Introduction

⚡ Github Stats
☄️ Github Streaks

Random programming joke

Jokes Card

testshoter's People

Contributors

fhodun avatar firesz25 avatar gbaranski avatar szolowicz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

testshoter's Issues

Bot not sending any responses

I installed bot on my vps (Ubuntu 16.04). I started bot, it appears online, I try to interact with it by typing >version. There is no response from bot on discord chat, but in putty I see an error:

 npm start

> [email protected] start /root/testshoter
> ts-node -r dotenv/config -r tsconfig-paths/register .

Logged in!
(node:473) UnhandledPromiseRejectionWarning: TypeError: fields.flat is not a function
    at Function.normalizeFields (/root/testshoter/node_modules/discord.js/src/structures/MessageEmbed.js:450:8)
    at MessageEmbed.setup (/root/testshoter/node_modules/discord.js/src/structures/MessageEmbed.js:78:91)
    at new MessageEmbed (/root/testshoter/node_modules/discord.js/src/structures/MessageEmbed.js:18:10)
    at embedLikes.map.e (/root/testshoter/node_modules/discord.js/src/structures/APIMessage.js:166:40)
    at Array.map (<anonymous>)
    at APIMessage.resolveData (/root/testshoter/node_modules/discord.js/src/structures/APIMessage.js:166:31)
    at TextChannel.send (/root/testshoter/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:166:62)
    at /root/testshoter/src/discord/misc.ts:12:25
    at Generator.next (<anonymous>)
    at /root/testshoter/src/discord/misc.ts:8:71
(node:473) 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(). (rejection id: 2)
(node:473) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I did something wrong or what? Need fast help.
pzdr

Repl.it `.env` not loading

Hello.
I want to host this bot on repl. it but there is problem. I don't know how to npm start this bot from index.ts file.
Can you describe how to run bot without using console but just index.ts/index.js or whatever file so it run after clicking start

I don't know what I am doing wrong. You can test it on repl.it

When i try to run this from shell npm start this is output:

> [email protected] start /home/runner/ConsiderableVerticalClosedsource
> ts-node -r dotenv/config -r tsconfig-paths/register .


/home/runner/ConsiderableVerticalClosedsource/src/discord/commands/index.ts:9
  throw new Error(
        ^
Error: COMMAND_PREFIX is not defined in .env, default value is '>'
    at Object.<anonymous> (/home/runner/ConsiderableVerticalClosedsource/src/discord/commands/index.ts:9:9)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Module.m._compile (/home/runner/ConsiderableVerticalClosedsource/node_modules/ts-node/src/index.ts:1056:23)
    at Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Object.require.extensions.(anonymous function) [as .ts] (/home/runner/ConsiderableVerticalClosedsource/node_modules/ts-node/src/index.ts:1059:12)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `ts-node -r dotenv/config -r tsconfig-paths/register .`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

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.