Git Product home page Git Product logo

fortnite-bot's Introduction

Hi, I'm Abhinav!

Abhinav's Github stats

fortnite-bot's People

Contributors

abhinavk99 avatar dependabot[bot] avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fortnite-bot's Issues

pm2 give errored

hi how to to keep bot online? i have use pm2 but status always errored.

List commands

Use @Botfather to set the bot commands, through the /setcommands command.

By the way, the bot is not working for me.

Nickname support

/nick nickname, fortnite name
/deletenick nickname

Then /user nickname will search the fortnite name

Issues with top percentages between /user and /compare

The percentages for the top stats don't match up for /user and /compare. Also, the first user's percentages for /compare are flipped compared to /user.

/user 45b16

Top 3/5/10 Rate: 7.70%
Top 6/12/25 Rate: 14.96%

/user ninja

Top 3/5/10 Rate: 45.44%
Top 6/12/25 Rate: 54.92%

/compare 45b16, ninja

      User            45b16      Ninja    
 Top 3/5/10 Rate      19.25%     45.57%   
Top 6/12/25 Rate      3.41%      54.79%   

Http 403 error

here is npm test

[email protected] test C:\Users\test\Documents\fortnite-bot
mocha --reporter spec --timeout 5000

[TEMP CACHE] Resetting at Thu Jul 19 2018 12:44:20 GMT+0200 (Środkowoeuropejski czas letni)

[FIREBASE] p:0: Making a connection attempt
[FIREBASE] p:0: Auth token refreshed
[FIREBASE] getToken() completed. Creating connection.
[FIREBASE] c:0:0: Connection created
#Fortnite Data
[FIREBASE] c:0:0:0 Websocket connecting to wss://tracker-82e6a.firebaseio.com/.ws?v=5
√ should have methods to get Fortnite data
√ should have methods to access the cache
Username: 4,ycdoetnuid49 -- Error: HTTP Error: 403 Forbidden
1) should handle error for global with invalid username
[FIREBASE] p:0: Listen called for /users/-2083043549 default
[FIREBASE] c:0:0:0 Websocket connected.
[FIREBASE] c:0:0: Realtime connection established.
[FIREBASE] p:0: connection ready
[FIREBASE] p:0: reportStats {"c":{"sdk.node.4-13-0":1}}
[FIREBASE] p:0: {"r":1,"a":"s","b":{"c":{"sdk.node.4-13-0":1}}}
[FIREBASE] p:0: Listen on /users/-2083043549 for default
[FIREBASE] p:0: {"r":2,"a":"q","b":{"p":"/users/-2083043549","h":""}}
[FIREBASE] p:0: from server: {"r":1,"b":{"s":"ok","d":""}}
[FIREBASE] c:0:0: Primary connection is healthy.
[FIREBASE] p:0: from server: {"r":2,"b":{"s":"permission_denied","d":"Permission denied"}}
[FIREBASE] p:0: listen response {"s":"permission_denied","d":"Permission denied"}
[FIREBASE] event: /users/-2083043549:cancel
(node:9888) UnhandledPromiseRejectionWarning: Error: permission_denied at /users/-2083043549: Client doesn't have permission to access the desired data.
at errorForServerCode (C:\Users\test\Documents\fortnite-bot\node_modules@firebase\database\dist\index.node.cjs.js:648:17)
at onComplete (C:\Users\test\Documents\fortnite-bot\node_modules@firebase\database\dist\index.node.cjs.js:9115:36)
at Object.onComplete (C:\Users\test\Documents\fortnite-bot\node_modules@firebase\database\dist\index.node.cjs.js:12685:34)
at C:\Users\test\Documents\fortnite-bot\node_modules@firebase\database\dist\index.node.cjs.js:11801:32
at PersistentConnection.onDataMessage_ (C:\Users\test\Documents\fortnite-bot\node_modules@firebase\database\dist\index.node.cjs.js:12056:17)
at Connection.onDataMessage_ (C:\Users\test\Documents\fortnite-bot\node_modules@firebase\database\dist\index.node.cjs.js:11341:14)
at Connection.onPrimaryMessageReceived_ (C:\Users\test\Documents\fortnite-bot\node_modules@firebase\database\dist\index.node.cjs.js:11335:18)
at WebSocketConnection.onMessage (C:\Users\test\Documents\fortnite-bot\node_modules@firebase\database\dist\index.node.cjs.js:11236:27)
at WebSocketConnection.appendFrame_ (C:\Users\test\Documents\fortnite-bot\node_modules@firebase\database\dist\index.node.cjs.js:10841:18)
at WebSocketConnection.handleIncomingFrame (C:\Users\test\Documents\fortnite-bot\node_modules@firebase\database\dist\index.node.cjs.js:10891:22)
at Client.mySock.onmessage (C:\Users\test\Documents\fortnite-bot\node_modules@firebase\database\dist\index.node.cjs.js:10788:19)
at Client.dispatchEvent (C:\Users\test\Documents\fortnite-bot\node_modules\faye-websocket\lib\faye\websocket\api\event_target.js:22:30)
at Client._receiveMessage (C:\Users\test\Documents\fortnite-bot\node_modules\faye-websocket\lib\faye\websocket\api.js:150:10)
at Client. (C:\Users\test\Documents\fortnite-bot\node_modules\faye-websocket\lib\faye\websocket\api.js:34:49)
at emitOne (events.js:121:20)
at Client.emit (events.js:211:7)
at Client. (C:\Users\test\Documents\fortnite-bot\node_modules\websocket-driver\lib\websocket\driver\hybi.js:454:14)
at pipe (C:\Users\test\Documents\fortnite-bot\node_modules\websocket-extensions\lib\pipeline\index.js:37:40)
at Pipeline._loop (C:\Users\test\Documents\fortnite-bot\node_modules\websocket-extensions\lib\pipeline\index.js:44:3)
at Pipeline.processIncomingMessage (C:\Users\test\Documents\fortnite-bot\node_modules\websocket-extensions\lib\pipeline\index.js:13:8)
at Extensions.processIncomingMessage (C:\Users\test\Documents\fortnite-bot\node_modules\websocket-extensions\lib\websocket_extensions.js:133:20)
at Client._emitMessage (C:\Users\test\Documents\fortnite-bot\node_modules\websocket-driver\lib\websocket\driver\hybi.js:445:22)
at Client._emitFrame (C:\Users\test\Documents\fortnite-bot\node_modules\websocket-driver\lib\websocket\driver\hybi.js:405:19)
at Client.parse (C:\Users\test\Documents\fortnite-bot\node_modules\websocket-driver\lib\websocket\driver\hybi.js:141:18)
at Client.parse (C:\Users\test\Documents\fortnite-bot\node_modules\websocket-driver\lib\websocket\driver\client.js:62:58)
at IO.write (C:\Users\test\Documents\fortnite-bot\node_modules\websocket-driver\lib\websocket\streams.js:80:16)
at TLSSocket.ondata (_stream_readable.js:639:20)
at emitOne (events.js:116:13)
at TLSSocket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at TLSSocket.Readable.push (_stream_readable.js:208:10)
at TLSWrap.onread (net.js:597:20)
(node:9888) 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: 3)
(node:9888) [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.
2) should handle error for modes with invalid username
Username: 4,ycdoetnuid49 -- Error: HTTP Error: 403 Forbidden
3) should handle error for recent with invalid username
Username: 4,ycdoetnuid49 -- Error: HTTP Error: 403 Forbidden
4) should handle error for rold with invalid username
Username: 4,ycdoetnuid49 -- Error: HTTP Error: 403 Forbidden
5) should handle error for season with invalid username
Username: 4,ycdoetnuid49 -- Error: HTTP Error: 403 Forbidden
6) should handle error for rating with invalid username
Username: 4,ycdoetnuid49 -- Error: HTTP Error: 403 Forbidden
7) should handle error for kd with invalid username
Username: 4,ycdoetnuid49 .y4223lt3 -- Error: HTTP Error: 403 Forbidden
8) should handle error for compare with invalid username
Username: ninja -- Error: HTTP Error: 403 Forbidden
9) should get global data
Username: ninja -- Error: HTTP Error: 403 Forbidden
10) should get solo season 4 data
Username: ninja -- Error: HTTP Error: 403 Forbidden
11) should get recent data
Username: ninja -- Error: HTTP Error: 403 Forbidden
12) should get recent data in old format
Username: ninja -- Error: HTTP Error: 403 Forbidden
13) should get season 4 data
Username: ninja -- Error: HTTP Error: 403 Forbidden
14) should get TRN rating data
Username: ninja -- Error: HTTP Error: 403 Forbidden
15) should get K/D data
Username: ninja TSM_Myth -- Error: HTTP Error: 403 Forbidden
16) should get comparing data

2 passing (13s)
16 failing

  1. #Fortnite Data
    should handle error for global with invalid username:

    AssertionError: expected 'HTTP Error: 403 Forbidden' to equal 'User 4,ycdoetnuid49 not found.'

    • expected - actual

    -HTTP Error: 403 Forbidden
    +User 4,ycdoetnuid49 not found.

    at Context.it (test\testFortniteData.js:29:22)
    at
    at process._tickCallback (internal/process/next_tick.js:188:7)

  2. #Fortnite Data
    should handle error for modes with invalid username:
    Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\Users\test\Documents\fortnite-bot\test\testFortniteData.js)

  3. #Fortnite Data
    should handle error for recent with invalid username:

    AssertionError: expected 'HTTP Error: 403 Forbidden' to equal 'User 4,ycdoetnuid49 not found.'

    • expected - actual

    -HTTP Error: 403 Forbidden
    +User 4,ycdoetnuid49 not found.

    at Context.it (test\testFortniteData.js:49:22)
    at
    at process._tickCallback (internal/process/next_tick.js:188:7)

  4. #Fortnite Data
    should handle error for rold with invalid username:

    AssertionError: expected 'HTTP Error: 403 Forbidden' to equal 'User 4,ycdoetnuid49 not found.'

    • expected - actual

    -HTTP Error: 403 Forbidden
    +User 4,ycdoetnuid49 not found.

    at Context.it (test\testFortniteData.js:57:22)
    at
    at process._tickCallback (internal/process/next_tick.js:188:7)

  5. #Fortnite Data
    should handle error for season with invalid username:

    AssertionError: expected 'HTTP Error: 403 Forbidden' to equal 'User 4,ycdoetnuid49 not found.'

    • expected - actual

    -HTTP Error: 403 Forbidden
    +User 4,ycdoetnuid49 not found.

    at Context.it (test\testFortniteData.js:65:22)
    at
    at process._tickCallback (internal/process/next_tick.js:188:7)

  6. #Fortnite Data
    should handle error for rating with invalid username:

    AssertionError: expected 'HTTP Error: 403 Forbidden' to equal 'User 4,ycdoetnuid49 not found.'

    • expected - actual

    -HTTP Error: 403 Forbidden
    +User 4,ycdoetnuid49 not found.

    at Context.it (test\testFortniteData.js:73:22)
    at
    at process._tickCallback (internal/process/next_tick.js:188:7)

  7. #Fortnite Data
    should handle error for kd with invalid username:

    AssertionError: expected 'HTTP Error: 403 Forbidden' to equal 'User 4,ycdoetnuid49 not found.'

    • expected - actual

    -HTTP Error: 403 Forbidden
    +User 4,ycdoetnuid49 not found.

    at Context.it (test\testFortniteData.js:81:22)
    at
    at process._tickCallback (internal/process/next_tick.js:188:7)

  8. #Fortnite Data
    should handle error for compare with invalid username:

    AssertionError: expected 'HTTP Error: 403 Forbidden' to equal 'User 4,ycdoetnuid49 or .y4223lt3 not found.'

    • expected - actual

    -HTTP Error: 403 Forbidden
    +User 4,ycdoetnuid49 or .y4223lt3 not found.

    at Context.it (test\testFortniteData.js:89:22)
    at
    at process._tickCallback (internal/process/next_tick.js:188:7)

  9. #Fortnite Data
    should get global data:
    Error: the string "HTTP Error: 403 Forbidden" was thrown, throw an Error :)
    at
    at process._tickCallback (internal/process/next_tick.js:188:7)

  10. #Fortnite Data
    should get solo season 4 data:
    Error: the string "HTTP Error: 403 Forbidden" was thrown, throw an Error :)
    at
    at process._tickCallback (internal/process/next_tick.js:188:7)

  11. #Fortnite Data
    should get recent data:
    Error: the string "HTTP Error: 403 Forbidden" was thrown, throw an Error :)
    at
    at process._tickCallback (internal/process/next_tick.js:188:7)

  12. #Fortnite Data
    should get recent data in old format:
    Error: the string "HTTP Error: 403 Forbidden" was thrown, throw an Error :)
    at
    at process._tickCallback (internal/process/next_tick.js:188:7)

  13. #Fortnite Data
    should get season 4 data:
    Error: the string "HTTP Error: 403 Forbidden" was thrown, throw an Error :)
    at
    at process._tickCallback (internal/process/next_tick.js:188:7)

  14. #Fortnite Data
    should get TRN rating data:
    Error: the string "HTTP Error: 403 Forbidden" was thrown, throw an Error :)
    at
    at process._tickCallback (internal/process/next_tick.js:188:7)

  15. #Fortnite Data
    should get K/D data:
    Error: the string "HTTP Error: 403 Forbidden" was thrown, throw an Error :)
    at
    at process._tickCallback (internal/process/next_tick.js:188:7)

  16. #Fortnite Data
    should get comparing data:
    Error: the string "HTTP Error: 403 Forbidden" was thrown, throw an Error :)
    at
    at process._tickCallback (internal/process/next_tick.js:188:7)

Integrate bot with Discord

Add Discord capabilities to the bot. Bot should be able to respond to requests from Telegram and Discord concurrently.

Season 4 possible?

Everything looks good, but how could I change season 3 stats to season 4?

Thank you!

EDIT: Nvm im stupid

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.