Code Monkey home page Code Monkey logo

livebot's Introduction

Hi there ๐Ÿ‘‹, I'm bsquidwrd

  • You can call me Squid for short

  • ๐Ÿ˜„ Pronouns: he/him/they/them

  • ๐Ÿ“ซ You can reach me on Twitter! (Please honor nohello if you message me)

  • ๐Ÿ“– I currently work full time as an Integration Engineer and am going to school for a Bachelors in Software Engineering

  • ๐Ÿ‘€ Iโ€™m interested in:

    • programming
    • api's
    • automating as much as possible
  • Notes:

    • The postings on this site are my own and do not necessarily reflect the views of Aeries Software.

livebot's People

Contributors

bsquidwrd avatar thatohio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

livebot's Issues

Delete previous notification on StreamLive

If someone goes live, check for the most recent notification message that was sent to Discord and delete. Then send a new message with the appropriate pings (if set)

Allow mass listing of server monitors

Provide a way to see/export all subscriptions for a server in one easy method, rather than flipping through the cards view.
Going one at a time for each subscription is tedious for servers such as community servers.

Suggestion from tsukana in Discord:

Is it possible for a command to generate an actual list of all the channels being monitored rather than the flip through card message to be able to see an overview?

Fix role selection

Due to limitations of Discord, only 25 roles can be displayed in a dropdown, however it's very feasible for a Discord server to have more than 25 roles.
This causes users to be unable to select the roles they want pinged for a monitor.

A new way of adding/removing roles to be mentioned needs to be developed.

Allow create/edit even without Embed perms

Because of permission checks before create/edit, not all users want the embed of the bot, and so it should only do a check for View Channel and Send Message.

Anything outside of that should be completely up to the server admins

channelPerms.ViewChannel
&& channelPerms.SendMessages
&& channelPerms.EmbedLinks
&& channelPerms.UseExternalEmojis

channelPerms.ViewChannel
&& channelPerms.SendMessages
&& channelPerms.EmbedLinks
&& channelPerms.UseExternalEmojis

Implement oneliner command

Example: monitor add https://twitch.tv/bsquidwrd #live-announcements "{role} {name} is live and is playing {game}! {url}" "Live Squad"

Revisit channeldelete publish if discord returns unknown channel

There may be a chance Discord throws an "Unknown Channel" error if the guild is unavailable for whatever reason.
Look into a way to determine if the guild is unavailable before publishing a channel delete

else if (ex.DiscordCode == DiscordErrorCode.UnknownChannel)
{
await _bus.Publish(new DiscordChannelDelete()
{
GuildId = streamSubscription.DiscordGuild.DiscordId,
ChannelId = streamSubscription.DiscordChannel.DiscordId,
});
continue;
}

Fix null reference for fake subscriptions (monitor check)

if (subscription.RolesToMention.Any() && guild != null)

Full Exception:

System.ArgumentNullException: Value cannot be null. (Parameter 'source')
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
   at LiveBot.Discord.SlashCommands.Helpers.NotificationHelpers.GetNotificationMessage(SocketGuild guild, ILiveBotStream stream, StreamSubscription subscription, ILiveBotUser user, ILiveBotGame game) in /src/LiveBot.Discord.SlashCommands/Helpers/NotificationHelpers.cs:line 59
   at LiveBot.Discord.SlashCommands.Modules.MonitorModule.CheckStreamAsync(Uri ProfileURL) in /src/LiveBot.Discord.SlashCommands/Modules/MonitorModule.cs:line 271
   at Discord.Interactions.Builders.ModuleClassBuilder.<>c__DisplayClass11_0.<<CreateCallback>g__ExecuteCallback|1>d.MoveNext()

Redo permissions

From PlavorSeol via Discord:

Since Application Command Permissions (hereinafter "ACP") v2, Discord provides UI for setting up permissions for bots in way more intuitive and consistent way than doing so via random command or dashboard, it would be good if the bot is compatible with ACP.

That being said, I suggest following things:

  • Drop any hard permission requirements across all commands, just let Discord handle them
  • Set default_member_permissions for /monitor to Manage Server
  • Set default_member_permissions for /config to Administrator
  • Remove admin-role option from /config command, as Discord's native ACP UI replaces it (and it cannot work with ACP without applications.commands.permissions.update OAuth2 scope anyway)

Switch from Http to Socket

This is due to rate limits and getting the entire bot down when exceeding them due to too many requests per second overall.
Switching to socket will allow for it all to be centrally managed by the discord.net library.

Determine if they went offline

If someone goes offline, change the most recent notification for the stream that was sent to Discord to show that they are now offline

Statistics

Create an page to show statistics such as how many notifications were sent out on a specific date, maybe how many people played a certain game, etc etc

Documentation

Write in-depth documentation of how to setup the bot

Server Management

Allow people with Manage Guild permission (or higher) to easily manage Subscriptions for the Discord Guilds they have the permission in

Create server overview command

This should output information about the server, similar to the admin command
Also should include the monitor role configuration for easy verification settings were saved correctly

Authentication

Implement Authentication to Login with Discord (possibly expand to other methods in the future for ideas I have)

Basic Homepage

Implement a Basic Landing page (similar to what I had with Python version)

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.