ciarancrocker / omnium Goto Github PK
View Code? Open in Web Editor NEWDiscord bot with automatic channel renaming and gameplay statistics.
License: BSD 3-Clause "New" or "Revised" License
Discord bot with automatic channel renaming and gameplay statistics.
License: BSD 3-Clause "New" or "Revised" License
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.
(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)```
The following improvements should be added to the graph command:
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:
Requested by @dmurphy95
commands:
~userstats USERNAME - Admin command to show gamestats of a certain user.
!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.
Can you please look into adding these to the bot:
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.
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.
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.
How does one go about adding yourself as an authenticated admin so that you can create new roles etc?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.