niles-bot / niles Goto Github PK
View Code? Open in Web Editor NEWNiles - a Discord bot for interfacing with Google Calendar
Home Page: http://nilesbot.com
License: MIT License
Niles - a Discord bot for interfacing with Google Calendar
Home Page: http://nilesbot.com
License: MIT License
Add comments about permissions, link to support channel. Alternative to creating calendar channel??
I.e on guild destroy or missing access
requested on discord
potentially stop using the bulkdelete all together and just use a for loop to delete messages by ID.
At a minimum need to provide feedback with regards to "deleting messages greater than 14 days old"
Add ability to set static starting day of display
when responding to the y/n query of "Do you want to restrict the use of the calendar to people with the"...
Niles crashes, throwing a Promise Rejection: undefined with error code undefined
[Fri, 28 Jul 2017 05:16:16 GMT] XXXX0:!display || guild:XXXX1
[Fri, 28 Jul 2017 05:16:22 GMT] timer not startedin guild: XXXX1
There really should be some restrictions so not just anybody can add to the calendar .
if there is I'm not finding it other than changing the prefix to something cryptic
Google rejects with 403 forbidden -> message channel with error saying the permissions are wrong.
function clean(channel, numberMessages, recurse) { ....
messages.forEach(function(message) {
if(message.id === calendar["calendarMessageId"]) {
calendar["calendarMessageId"] = "";
helpers.writeGuildSpecific(channel.guild.id, calendar, "calendar");
clearInterval(autoUpdater[channel.guild.id]);
**timerCount[message.guild.id] -= 1;**
Supposed to display GMT-4 and my calendar is written in GMT-6 but instead of 2 hours ahead, it's displaying 4 hours behind
somewhere, zone is not being parsed?
Need to trim.
When putting in all day events, the event bleeds over to the following day.,
Suggested fix:
Line 163 of commands.js
let lengthEvent = ((tempEndDate.getTime() - tempStartDate.getTime()) / (1000 * 60 * 60 * 24));
to
let lengthEvent = ((tempEndDate.getTime() - tempStartDate.getTime()-1) / (1000 * 60 * 60 * 24));
This, in theory, should set the length of the event to one second less, which should be enough to keep from bleeding over
Alternately, like 163 remains the same, and line 167 changes from
for (let x = 1; x <= lengthEvent; x++) { //Add New Entry For Each Day of A Multi Day Event
to
for (let x = 1; x < lengthEvent; x++) { //Add New Entry For Each Day of A Multi Day Event
uncaughtException errorRangeError: RichEmbed descriptions may not exceed 2048 characters.
Implement test for character size and provide recommendations to user to minimise embed size.
ever since #39 the bot has been crashing constantly after:
ENOENT and then uncaughtException
Changes; Discord v12 & Node.js 8 -> Node.js 12
Currently the !tz
command only allows a numerical entry, ie: GMT-07:00
. However, this doesn't take into account things such as daylight savings.
Please allow the !tz
command to use named timezones, such as America/Los_Angeles
, which will automatically account for daylight savings.
Further, also display the timezone somewhere in !display
.
"Cannot read property send of undefined"
My name is melt7777 and I work with the PiMP Testing/Support Team. We have filed this issue based on our testing of your Niles Discord Bot. Thank you very much for your work toward our mutual goal of making easy and effective tools for Discord moderators and administrators. We are bringing this issue to light because it is affecting our use of your product and we need your help.
This issue is to report that multiple-day events are not displayed correctly in the Discord. They show as only the first day. We tried "All-day" and with time defined on start and stop day. Filing separate issue for "undefined" as it should be something more user friendly there.
We added a multiple-day Event called "Doc vaca" from Nov 5 to 9th
Screenshot of Niles in our Discord channel:
Thank you again for your software!
~ melt7777
getpimp.org | miner.farm
This even happens even when you have 1 channel you displayed in.
!help should be in the channel and include basic commands for the general user
!adminhelp should be in a PM and for admin commands ie !purge
Just a thought
Enhancement request
First and foremost, i love this bot, it so simple.
I'd like to add a layer of sophistication to it to where if i create an event, members of the Discord can confirm going to it.
For example, if I create a RAID event !create RAID Saturday 10am -2pm
, members of the discord should be able to do something like !confirm RAID DeFlanko Saturday 10am
!confirm <Subject> <Gamertag> <Date>
That info could reside inside the comments of the Event.
Even fancier, if possible, set a need count too like !need 6 Saturday 10am
so this way in the comments it will show 6/6 at first, but everytime someone confirms to it the count number changes by one till 0
My name is melt7777 and I work with the PiMP Testing/Support Team. We have filed this issue based on our testing of your Niles Discord Bot. Thank you very much for your work toward our mutual goal of making easy and effective tools for Discord moderators and administrators. We are bringing this issue to light because it is affecting our use of your product and we need your help.
This issue is to report a bug/enhancement: when "All Day" was selected (no start/stop times were defined for the event), it showed as "undefined - undefined" in the time frame, which is confusing to the end user. We would humbly request that something else be displayed here, such as "All Day".
Thank you again for your great work!
~ melt7777
getpimp.org | miner.farm
Niles is recreating a lot of new guilds on startup, We need a simple file check to see if the guild already exists
Examples Submitted by user
embed:
{
"thumbnail":{
"url":"https:\/\/assets.url.tld\/silph-arena\/assets\/2020-03-01-regionals\/regionals-2020-crest.png",
"proxy_url":"https:\/\/images-ext-2.discordapp.net\/external\/AL2amu4gl1KzPyNcbwTZ12_nYFeAnYsBp-V8_2s36FQ\/https\/assets.url.tld\/silph-arena\/assets\/2020-03-01-regionals\/regionals-2020-crest.png",
"width":400,
"height":400
},
"author":{
"name":"Arkansas PvP",
"url":"https:\/\/silph.gg\/tournaments\/results\/myhf",
"icon_url":"https:\/\/assets.url.tld\/silph-arena\/assets\/silph-arena-logo\/logo-transparent-white.png",
"proxy_icon_url":"https:\/\/images-ext-2.discordapp.net\/external\/S5qW7u13zeXcsWFBod1oYR-Dt72yDcwnJ2DU06o1Twg\/https\/assets.url.tld\/silph-arena\/assets\/silph-arena-logo\/logo-transparent-white.png"
},
"fields":[
{
"name":"**__Points__** **__Trainer__**",
"value":"`8` [username](https:\/\/url.tld\/username)\n`7` [username](https:\/\/url.tld\/username)\n`6` [username](https:\/\/url.tld\/username)\n`6` [username](https:\/\/url.tld\/username)\n`5` [username](https:\/\/url.tld\/Madimausernamedeme)\n`4` [username](https:\/\/url.tld\/username)\n`4` [username](https:\/\/url.tld\/username)\n`4` [username](https:\/\/url.tld\/username)\n`4` [username](https:\/\/url.tld\/username)\n`4` [LyonsDen716](https:\/\/url.tld\/LyonsDen716)\n`4` [username](https:\/\/url.tld\/username)\n`4` [username](https:\/\/url.tld\/username)",
"inline":true
},
{
"name":"**__Points__** **__Trainer__**",
"value":"> `3` [username](https:\/\/url.tld\/username)\n> `3` [username](https:\/\/url.tld\/username)\n> `3` [username](https:\/\/url.tld\/username)\n> `3` [username](https:\/\/url.tld\/username)\n> `3` [username](https:\/\/url.tld\/username)\n> `3` [username](https:\/\/url.tld\/username)\n> `3` [username](https:\/\/url.tld\/username)\n> `3` [username](https:\/\/url.tld\/username)\n> ` ` [username](https:\/\/url.tld\/username)\n> `3` [dakeeler](https:\/\/url.tld\/username)\n> `3` [username](https:\/\/url.tld\/username)\n> `3` [username](https:\/\/url.tld\/username)\n> `3` [username](https:\/\/url.tld\/username)\n> `3` [username](https:\/\/url.tld\/username)\n> `3` [username](https:\/\/url.tld\/SirMillzy)\n> `3` [username](https:\/\/url.tld\/username)\n> `3` [username](https:\/\/url.tld\/username)\n> `3` [username](https:\/\/url.tld\/username)\n> `3` [username](https:\/\/url.tld\/username)",
"inline":true
},
{
"name":"**__Points__** **__Trainer__**",
"value":"> `2` [username](https:\/\/url.tld\/username)\n> `2` [username](https:\/\/url.tld\/username)\n> `2` [username](https:\/\/url.tld\/username)\n> `2` [username](https:\/\/url.tld\/username)\n> `2` [username](https:\/\/url.tld\/username)\n> `2` [username](https:\/\/url.tld\/username)\n> `2` [username](https:\/\/url.tld\/username)\n> `2` [username](https:\/\/url.tld\/username)\n> ` ` [username](https:\/\/url.tld\/username)\n> `2` [username](https:\/\/url.tld\/username)\n> `1` [username](https:\/\/url.tld\/username)\n> `1` [username](https:\/\/url.tld\/username)\n> `0` [KIlgoure](https:\/\/url.tld\/username)",
"inline":true
}
],
"color":16098851,
"timestamp":"2020-04-19T17:00:00+00:00",
"type":"rich",
"description":"> __**[Silph Arena Regional](https:\/\/url.td\/2020-regional-invitationals-competitor-info)**__ \nArkansas was chosen to host this season's regional tournament. The top two will go on to Go Fest to represent our region at the Continental Championship. There were 42 participants overall and a large portion from our state. \n\nWhile Cabot Pokemon Go and Conway Pokemon Speakeasy hosted, it was all done by the awesome folks running [ARPVP](https:\/\/silph.gg\/c\/74403ec5\/leaderboard). In the wake of the covid19 pandemic the ARPVP Squirtle Squad adapted and organized what I consider the highest honor our state has had with Silph Arena. Hopefully this is the first of many Arkansas regionals to come. Thank you Squirtle Squad for everything you do for our states success.\n\nThe path to the Championships has started but the Silph Arena Season continues. Expect more Speakeasy Silph Cups to be scheduled soon.\n\n**__Results__**",
"url":"https:\/\/url.td\/tournaments\/results\/code",
"title":"2020 Regional Invitationals: Arkansas"
}
potential options:
digest some time before, i.e. <list of events> starting in x hours
.
alternative / "standard", event starting in x hours / mins.
After changing calendarID, keeps re-writing old events (probably pulling from the old JSON file in memory the old "timer" ?).
Need to add clearInterval. More likely an indicator that everything really needs to be moved to an SQL database.
I am getting the following errors, when trying to "!display" the calendar. I tried with NodeJS v12 and v14
[Thu, 06 Aug 2020 16:55:16 GMT] Error in function getEvents in guild: xxxxxx : ReferenceError: params is not defined
[Thu, 06 Aug 2020 16:55:17 GMT] Promise Rejection: DiscordAPIError: Cannot send an empty message
Am I missing something?
"It might be easier to just do like a clear all, then upon restart, it queues all the servers up and slowly starts to update them. That way it doesn't then get recaught on something. I don't know how feasible that is, as it probably depends on how many different discords the bot is in.
If the killed message never displayed, no one would know. Then they would just manually update anyway hehe"
Need to resolve issues across channels or similar.
At this stage implement timer dying every time calendar can't be found in "thisChannel"?
for adding details about memory leak debugging
Log Preview
[Thu, 10 Sep 2020 21:16:35 GMT] USER#0000:!create ... || guild:XXXXXXXXXXXXXXXXXX || shard:1
[Thu, 10 Sep 2020 21:18:03 GMT] error reading file SyntaxError: Unexpected end of JSON input
[Thu, 10 Sep 2020 21:18:20 GMT] error reading file SyntaxError: Unexpected end of JSON input
[Thu, 10 Sep 2020 21:19:49 GMT] error reading file SyntaxError: Unexpected end of JSON input
[Thu, 10 Sep 2020 21:19:52 GMT] error reading file SyntaxError: Unexpected end of JSON input
[Thu, 10 Sep 2020 21:19:57 GMT] Promise Rejection: TypeError: m.edit is not a function
[Thu, 10 Sep 2020 21:21:30 GMT] error reading file SyntaxError: Unexpected end of JSON input
[Thu, 10 Sep 2020 21:21:35 GMT] Promise Rejection: AbortError: The user aborted a request.
[Thu, 10 Sep 2020 21:23:37 GMT] function getEvents error in guild: XXXXXXXXXXXXXXXXXX : Error: {"origin":"Events.list","error":"Client network socket disconnected before secure TLS connection was established"}
[Thu, 10 Sep 2020 21:30:10 GMT] function getEvents error in guild: XXXXXXXXXXXXXXXXXX : Error: {"origin":"Events.list","error":"Client network socket disconnected before secure TLS connection was established"}
[Thu, 10 Sep 2020 21:21:36 GMT] function getEvents error in guild: XXXXXXXXXXXXXXXXXX : Error: {"origin":"Events.list","error":"Client network socket disconnected before secure TLS connection was established"}
[Thu, 10 Sep 2020 21:30:42 GMT] Promise Rejection: AbortError: The user aborted a request.
[Thu, 10 Sep 2020 21:21:36 GMT] function getEvents error in guild: XXXXXXXXXXXXXXXXXX : Error: {"origin":"Events.list","error":"Client network socket disconnected before secure TLS connection was established"}
we have hit the discord limit of guild per session
Changes needed
Irrelevant Changes
in order to help fix #37 - why do something yourself when someone else does it better?
This allows for easier parsing of dates, since moment.js is already installed and used for !stats
Current Output:
!admin - Restrict usage to a specific role, i.e. “Scheduler” or “Captain”. Role must be assigned to yourself before using command.
Proposed:
Cannot find "role". Role assign is case sensitive. Please be sure to assign the role to yourself before setting it as the admin role.
"i think what you guys got works great, maybe just adding that extra line just so people know the role needs to be assigned to themselves first"
Occurs when has read but not write permissions in a certain channel.
Possibly send a message to the user or in #general that the full permissions have not been granted.
New Discord.js endpoint, need to change the way server count is displayed in !stats.
1. Invite [email protected] to 'manage events' on the Google Calendar you want to use with Niles
Change manage events to 'make changes and manage events'
Enter a calendar ID using !id, i.e. !id [email protected]
Change the example to the same url in !setup so it doesn't look like an email.
something went wrong
When entering !tz with nothing after it. Explain the error ie. Enter the timezone you want to use in Discord with the !tz command, i.e. !tz gmt+10:00, (Note: Must be formatted like this)
has a low likelihood, given you need the unique id of the calendar, but is entirely possible, and if Niles has access, then anyone can add the calendar and interface with it.
error running main message handler in guild: XXXX: TypeError: Cannot read property '0' of undefined
Hey,
really appreciate the Bot so far, a little feature would make it a lot more usable for me:
Choose your Date Format, since I'm from Germany I would write 04.05.2020 for today but the bot needs 05.04.2020 which is quite confusing
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.