Giter Site home page Giter Site logo

locistar / organizer Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 36.74 MB

A configurable multipurpose bot bringing you organizing commands, multiplayer games, moderation commands and more!

Java 99.91% Dockerfile 0.09%
discord java discord-bot discord4j-bot discord4j

organizer's People

Contributors

locistar avatar

Stargazers

 avatar

Watchers

 avatar

organizer's Issues

Event id rework

The private key of an event is at the moment the event title.
This might be a problem, because users from two different guilds/servers can not create the same event.

ToDo:

  • The event needs a new private key/ id
  • The event still needs the guild id
  • The event id needs also to be saved in the user DB

remove duplicate event creation for command /event create

Issue:
If a user is creating an event with the same name, he is only able to edit/ schedule the first one.
Also deleting events, that exists with the same name could lead to issues, where the event id is not deleted from DBUser.

Possible Solutions:

  • Make a selection for the user, if he has multiple events with the same name
  • Only allow event titles with different names for a user
  • Rename the event, if it has a exsisting name (e.g. add (1))
  • Rename the event, but do not display the counter for duplicated events in the event title

new Event planner command "/event"

New Command to plan and schedule events.
This might replace the "/group" commands

Commands:

/event create [name] [description_optional] [...members]
/event schedule [name] [date] [time]
/event publish [name]
/event delete [name]
/event addUser [User] [User] [User] ...

/moderation setup_bot_messages

Details:

  • /event create

  • create a new event

  • members are optional -> owner is always member

  • create server role @event_$name and add all members to it

  • to discuss: variable "max_size" needed?

    • (pro) can create events with a limited member size
    • (con) user unfriendly
  • /event schedule

  • only event owner can schedule a event

  • event might be displayed in a Discord Chat

  • privacy: Users might need to confirm first, that they want to get a message from the bot

  • inform users that a new event has been scheduled

  • new TaskService -> event reminder

  • /event publish [name]

  • an event can only be published, when it is scheduled

  • only a event owner can publish an event

  • embed with button to join/ leave the event

  • when publishing add tag (server role) @event_$name

  • add user when joining to the server role @event_$name

  • /event delete [name]

  • delete an event

  • if scheduled inform all event members

  • /moderation setup_bot_messages

  • Create a message with a button, that will unlock direct messages to a user.

  • If a user didn't register to the bot, they won't receive private bot messages

prune command

  • prune x latest commands (with max. 100)
  • prune x latest commands of user (max. 100, if possible all)

i18n

rework i18n

  • #2

  • replace all old names and links

  • add a German translation

Fix event scheduler

If user is registered to bot and wants to schedule an event, the user will receive an error.

17:34:04.233 ERROR [boundedElastic-9/locibot]: {Guild ID: 712377054531944510} [event schedule] An unknown error occurred: Cannot invoke "java.lang.Long.longValue()" because the return value of "com.locibot.locibot.database.events_db.bean.DBEventBean.getScheduledDate()" is null

Possible{ApplicationCommandInteractionData{id=Possible{942742961937080342}, name=Possible{event}, type=Possible{1}, resolved=Possible.absent, options=[ApplicationCommandInteractionOptionData{name=schedule, value=Possible.absent, type=1, options=[ApplicationCommandInteractionOptionData{name=event_title, value=Possible{test}, type=3, options=null}, ApplicationCommandInteractionOptionData{name=date, value=Possible{19.04.2022}, type=3, options=null}, ApplicationCommandInteractionOptionData{name=time, value=Possible{18:00}, type=3, options=null}]}], customId=Possible.absent, componentType=Possible.absent, values=null, targetId=Possible.absent}}
java.lang.NullPointerException: Cannot invoke "java.lang.Long.longValue()" because the return value of "com.locibot.locibot.database.events_db.bean.DBEventBean.getScheduledDate()" is null
	at com.locibot.locibot.command.event_commands.EventUtil.lambda$privateInvite$1(EventUtil.java:60)
	Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
Assembly trace from producer [reactor.core.publisher.MonoFlatMap] :
	reactor.core.publisher.Mono.flatMap(Mono.java:3047)
	com.locibot.locibot.command.event_commands.EventUtil.lambda$privateInvite$2(EventUtil.java:51)
Error has been observed at the following site(s):
	|_     Mono.flatMap ⇢ at com.locibot.locibot.command.event_commands.EventUtil.lambda$privateInvite$2(EventUtil.java:51)
	|_     Mono.flatMap ⇢ at com.locibot.locibot.command.event_commands.EventUtil.privateInvite(EventUtil.java:50)
	|_     Mono.flatMap ⇢ at com.locibot.locibot.command.event_commands.ScheduleEventCmd.lambda$execute$4(ScheduleEventCmd.java:44)
	|_     Mono.flatMap ⇢ at com.locibot.locibot.command.event_commands.ScheduleEventCmd.lambda$execute$5(ScheduleEventCmd.java:44)
	|_   Flux.concatMap ⇢ at com.locibot.locibot.command.event_commands.ScheduleEventCmd.lambda$execute$8(ScheduleEventCmd.java:43)
	|_ Flux.collectList ⇢ at com.locibot.locibot.command.event_commands.ScheduleEventCmd.lambda$execute$8(ScheduleEventCmd.java:55)
	|_        Mono.then ⇢ at com.locibot.locibot.command.event_commands.ScheduleEventCmd.lambda$execute$8(ScheduleEventCmd.java:43)
	|_        Mono.then ⇢ at com.locibot.locibot.command.event_commands.ScheduleEventCmd.lambda$execute$8(ScheduleEventCmd.java:57)
	|_     Mono.flatMap ⇢ at com.locibot.locibot.command.event_commands.ScheduleEventCmd.lambda$execute$8(ScheduleEventCmd.java:58)
	|_     Mono.flatMap ⇢ at com.locibot.locibot.command.event_commands.ScheduleEventCmd.execute(ScheduleEventCmd.java:38)
	|_        Mono.then ⇢ at com.locibot.locibot.command.event_commands.ScheduleEventCmd.execute(ScheduleEventCmd.java:37)
	|_     Mono.flatMap ⇢ at com.locibot.locibot.core.command.CommandProcessor.executeCommand(CommandProcessor.java:80)
	|_ Mono.doOnSuccess ⇢ at com.locibot.locibot.core.command.CommandProcessor.executeCommand(CommandProcessor.java:81)
Stack trace:
		at com.locibot.locibot.command.event_commands.EventUtil.lambda$privateInvite$1(EventUtil.java:60)
		at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:125)
		at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:74)
		at reactor.core.publisher.MonoPeekTerminal$MonoTerminalPeekSubscriber.onNext(MonoPeekTerminal.java:180)
		at reactor.core.publisher.FluxMapFuseable$MapFuseableConditionalSubscriber.onNext(FluxMapFuseable.java:295)
		at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
		at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
		at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
		at java.base/java.lang.Thread.run(Thread.java:833)

nickname command

  • chnage nickname of user

  • change nickname of all users with role x

  • reset nickname of all users with role x

  • moderation group

Event exception handling

Add exception handling to all event commands.

If a user enters a wrong date (schedule), time format, or if the user enters anything wrong, tell the user the correct format and do not throw an exception.

blocked by #96

Delete userdata after x time

  • create timestamp in database
  • uptade timestamp on every command use (SlashCommand and ButtonEvents)
  • create a scheduler, that deletes the userdata after not using the bot for a specific period (warning message)

Create Wiki

Create a wiki with all needed information like:

  • how does the bot function
  • command list
  • ...

Update Documentation for all event commands

All event commands got updated and some new commands were added.

ToDos:

  • Update documentation for all event commands in wiki
  • Update documentation on all Discord-Bot-List-Websites

new Weather Graph

Create a new graph to display both rain volume and rain probability in one graph.
This will replace the RainMap.

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.