Code Monkey home page Code Monkey logo

omnium's People

Contributors

ciarancrocker avatar unreturnable avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

omnium's Issues

Voting system

Add a feature to allow for calling a vote in a fashion similarly to below:

~call_vote @Committee Buy more bananas

This would call a vote with a topic of "Buy more bananas", and will constrain the vote to close either when all members of the role Committee have voted or after a predetermined amount of time has passed.

Calling a vote would cause the bot to create a new message with the topic of the vote and add 3 reactions, one for each of For, Against or Abstain. After closing the vote, the bot would count the number of valid votes for each category and record them in the original message. A vote would be classed as invalid if someone outside of the constrained role cast a vote or if a member has voted more than once.

Add more commands

Can you please look into adding these to the bot:

  • addrank (NAME): create a new role.
  • delrank (NAME): delete a rank created with addrank.
  • joinrank (NAME): join a rank that was created with addrank.
  • massdelete (NUMBER): delete the last n messages.
  • flip: flip a coin.
  • roll (NUMBER): roll an n sided die.

Command Suggestion

commands:
~userstats USERNAME - Admin command to show gamestats of a certain user.

Game graph tracks timeslots played not time played

The game graph doesn't seem to track the total hours played during a day but the number of hour timeslots that the game is played in. This can be seen by looking at the graph data because it is never higher than 24 hours. The playtime for league has skyrocketed in recent days and the game graph doesn't reflect this. It seems to say that if at least 1 player played the game within the 6PM to 7PM timeslot for the day and also the 9AM to 10AM timeslot on that day there were only 2 hours of play time that day even if multiple players were playing in that time - this is just an example for a day when only 2 hours of gameplay is recorded.

Show associated channels when listing roles

The intention of the bot's role management features is to manage access to channels in a server; it may be beneficial to show if a role has any associated channels, and if so what they are when a user issues the list_roles command.

Theoretically this can be achieved by filtering the list of channels in the server to include only ones that have a permission override allowing access to a role when creating the role list.

Improvements to Graph command

The following improvements should be added to the graph command:

  • Number of days as an argument
  • Specify game name as argument to get the stats for just that game
  • Show dates on X axis (may not be possible with currently library)

Stream Notifier

Possible inclusion of the bot posting a message onto a channel regarding a livestream going online, primarily Twitch focused.

Ideally editable with a admin command.

!game_stats not handling special characters

!game_stats doesn't seem to handle special characters like

The following command returns all of the game_stats data when it should default to just the first 10 rows.

!game_stats ℍ

This command with respect the limit given but will match to any game name

!game_stats ℍ 10

The full cause of this issue was not tested for but it can be assumed to lie somewhere in these lines from game_stats.js

if (isNaN(args[1]) && typeof args[1] !== 'undefined') {
        data = await database.getStatisticsForGame(
          args[1].replace(/["']/g, ''),
          args[2]
        );
      } else {
        if (typeof args[1] !== 'undefined') {
          data = await database.getGameStatistics(parseInt(args[1]));
        } else {
          data = await database.getGameStatistics(10);
        }
      }

It would also be worth having a discussion of enforcing a 50 game stat limit in any none DM channel.

Load Error

(node:10604) UnhandledPromiseRejectionWarning: error: relation "channels" does not exist
    at Connection.parseE (C:\Users\Lam'Family\Desktop\omnium-develop\node_modules\pg\lib\connection.js:604:13)
    at Connection.parseMessage (C:\Users\Lam'Family\Desktop\omnium-develop\node_modules\pg\lib\connection.js:403:19)
    at Socket.<anonymous> (C:\Users\Lam'Family\Desktop\omnium-develop\node_modules\pg\lib\connection.js:123:22)
    at Socket.emit (events.js:198:13)
    at addChunk (_stream_readable.js:288:12)
    at readableAddChunk (_stream_readable.js:269:11)
    at Socket.Readable.push (_stream_readable.js:224:10)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
(node:10604) 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: 1)
(node:10604) [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.
(node:10604) UnhandledPromiseRejectionWarning: error: relation "channels" does not exist
    at Connection.parseE (C:\Users\Lam'Family\Desktop\omnium-develop\node_modules\pg\lib\connection.js:604:13)
    at Connection.parseMessage (C:\Users\Lam'Family\Desktop\omnium-develop\node_modules\pg\lib\connection.js:403:19)
    at Socket.<anonymous> (C:\Users\Lam'Family\Desktop\omnium-develop\node_modules\pg\lib\connection.js:123:22)
    at Socket.emit (events.js:198:13)
    at addChunk (_stream_readable.js:288:12)
    at readableAddChunk (_stream_readable.js:269:11)
    at Socket.Readable.push (_stream_readable.js:224:10)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
(node:10604) 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:10604) UnhandledPromiseRejectionWarning: error: relation "channels" does not exist
    at Connection.parseE (C:\Users\Lam'Family\Desktop\omnium-develop\node_modules\pg\lib\connection.js:604:13)
    at Connection.parseMessage (C:\Users\Lam'Family\Desktop\omnium-develop\node_modules\pg\lib\connection.js:403:19)
    at Socket.<anonymous> (C:\Users\Lam'Family\Desktop\omnium-develop\node_modules\pg\lib\connection.js:123:22)
    at Socket.emit (events.js:198:13)
    at addChunk (_stream_readable.js:288:12)
    at readableAddChunk (_stream_readable.js:269:11)
    at Socket.Readable.push (_stream_readable.js:224:10)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
(node:10604) 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:10604) UnhandledPromiseRejectionWarning: error: relation "channels" does not exist
    at Connection.parseE (C:\Users\Lam'Family\Desktop\omnium-develop\node_modules\pg\lib\connection.js:604:13)
    at Connection.parseMessage (C:\Users\Lam'Family\Desktop\omnium-develop\node_modules\pg\lib\connection.js:403:19)
    at Socket.<anonymous> (C:\Users\Lam'Family\Desktop\omnium-develop\node_modules\pg\lib\connection.js:123:22)
    at Socket.emit (events.js:198:13)
    at addChunk (_stream_readable.js:288:12)
    at readableAddChunk (_stream_readable.js:269:11)
    at Socket.Readable.push (_stream_readable.js:224:10)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
(node:10604) 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: 4)
(node:10604) UnhandledPromiseRejectionWarning: error: relation "channels" does not exist
    at Connection.parseE (C:\Users\Lam'Family\Desktop\omnium-develop\node_modules\pg\lib\connection.js:604:13)
    at Connection.parseMessage (C:\Users\Lam'Family\Desktop\omnium-develop\node_modules\pg\lib\connection.js:403:19)
    at Socket.<anonymous> (C:\Users\Lam'Family\Desktop\omnium-develop\node_modules\pg\lib\connection.js:123:22)
    at Socket.emit (events.js:198:13)
    at addChunk (_stream_readable.js:288:12)
    at readableAddChunk (_stream_readable.js:269:11)
    at Socket.Readable.push (_stream_readable.js:224:10)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
(node:10604) 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: 5)```

Static textual commands

Feature would allow commands that just return a static block of text to be created and managed from within Discord without sysadmin support.

Pretence of operation:

  1. Search for commands as usual
  2. If no commands are found, search a database table containing rows of (command, return_text).
  3. a) If a matching static command is found, reply to the message with it
  4. b) If no matching static command is found, quit out and ignore the message
  • Message handler logic for searching database for commands
  • Built in management commands (add_command, edit_command, delete_command)

Requested by @dmurphy95

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.