taliyos / form2rolebot Goto Github PK
View Code? Open in Web Editor NEWA discord bot that automatically assigns roles based off of a google form submission
License: GNU General Public License v3.0
A discord bot that automatically assigns roles based off of a google form submission
License: GNU General Public License v3.0
For more control over role groups.
ie. If a single role is assigned, all other roles in rolegroups are removed.
SecretTryhqrd#1864
The new roles get rid of all spaces. For example, a google form submission of "Super User, Epic User" would become "SuperUser" and "EpicUser" instead of "Super User" and "Epic User"
Will be configurable in config.json
For increased UX
This will give the bot a faster boot time.
If the bot comes across a role it can't identify, a new role should be created instead of ignoring the request.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
People should be assigned roles properly
Screenshots
If applicable, add screenshots to help explain your problem.
https://imgur.com/a/8aNhFd0
Desktop (please complete the following information):
The bot crash directly after the start but i was able have saved the errormessages.
Something with ther SERVER MEMBERS INTENT function broke the bot. Without this function the bot is running but won't update the user roles. With this function enabled i get the following errormessages and the bot chrash.
Errorlog:
Unbehandelte Ausnahme: System.AggregateException: Mindestens ein Fehler ist aufgetreten. ---> System.ArgumentNullException: Der Wert darf nicht NULL sein.
Parametername: name
bei Discord.Rest.GuildHelper.d__20.MoveNext()
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
bei System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
bei DiscordBot.SheetsFunctionality.d__3.MoveNext() in E:\Talios0\Form2RoleBot\DiscordBot\SheetsFunctionality.cs:Zeile 87.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei DiscordBot.Sheets.d__6.MoveNext() in E:\Talios0\Form2RoleBot\DiscordBot\Sheets.cs:Zeile 95.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei DiscordBot.Sheets.d__5.MoveNext() in E:\Talios0\Form2RoleBot\DiscordBot\Sheets.cs:Zeile 47.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei DiscordBot.Program.d__4.MoveNext() in E:\Talios0\Form2RoleBot\DiscordBot\Program.cs:Zeile 58.
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei DiscordBot.Program.Main(String[] args) in E:\Talios0\Form2RoleBot\DiscordBot\Program.cs:Zeile 22.
The bot should now the assignable roles. If it detects that a user has two of the same "class" of roles, the older one should be removed. Note: This should not remove roles that aren't meant to be assigned by the bot.
Occurs when a new role is created. Specifics about the bug are still unknown, but it stop the bot from assigning roles. Also when the rolegroups config is empty.
Bot doesn't auto update when changes are made to the linked Google Sheets document.
Additional context
Maybe have a toggle to PM users only once their nickname/role in a server has been assigned? I'm using the bot for verification through a restricted google form, so users are only able to access the server once their info has been updated. Would this toggle be difficult to do integrate?
Sorry for the basically back-to-back requests, this is a very unique bot!
Allow the bot to run without the GUI by either starting it with "--cmd" or specifying it in config.json
If it ain't broke don't fix it?
Never heard of it before, but I quickly found out that having delays in the terms of seconds is both impractical and improbable. Therefore, changing the delay from seconds to minutes will save the few seconds it would take to make the conversion.
The delay between updates should be easily customizable. (This was already implemented, but is being created so that it is documented.)
Describe the bug
Changing role submission to "None" doesn't remove the previous role from the user.
Desktop (please complete the following information):
Instead of creating the configuration files and closing, have the program ask for the required values.
Allowing for the user to input the values instead of opening and editing a JSON file will make the program easier to use and more user friendly.
Desired solution
When starting without valid configuration files, the program should ask the user to input the values into the command prompt. From there, the values will be stored in the JSON configuration files for future use. However, the user should still be able to close the program and enter the values manually as was the case in the previous versions.
Discord's rate limit makes updating the roles for every user impractical
The rate limit imposed by Discord makes it take a large amount of time to update the roles.
From "NAME #123123" to "NAME#123123"
The bot gets all the way to say "updating roles in {my server]" but it just sits there and does not update or move at all. I have already tried restarting, pressing enter clicking, and redownloading. I even tried an older version.
Users with spaces in their username aren't recongnized, they're skipped
Make the bot store the discord IDs so that a change in username doesn't break the system.
These IDs will be stored locally in version 0.2.0, but should be stored in the attached Google Sheet in following updates.
Very repetitive as of now.
The program should find the pre-existing role, no matter how the information from the attached Google Sheets is formatted. As of now, it'll create a new role instead, which has the potential for creating problems if an "Other" field or text field is used.
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.