Git Product home page Git Product logo

siotrix's Introduction

siotrix's People

Contributors

dsj7419 avatar skm19860915 avatar

Stargazers

 avatar

Watchers

 avatar

siotrix's Issues

database - Guild Thumbnail

GROUP - SETTINGS MODULE
PERMISSION - GUILD OWNER
COMMAND - "gthumbnail"

COMMANDS - "settings gthumbnail" - list current thumbnail for guild

"settings gthumbnail (URL)" - updates database with a URL address thumbnail for guild to use in various information displays such as "info" command

"settings gthumbnail reset" - will reset guild thumbnail to Siotrix Thumbnail (should be the bots global thumbnail address in database)

Embed "SIDEBAR" Color

GROUP - SETTINGS MODULE
PERMISSION - Guild OWNER
COMMAND - "color"
DESCRIPTION - Store a default embed color for guild so all embeds will be consistent for that guild

COMMANDS - "settings color" - list current color for embeds for guild in an embed that also displays the color.

"settings color list" - list all available colors user can select from and BOLDS the current selected color. list is in embed with current selected color.

"settings color (color)" - will select and update color for guild into database. It will then show confirmation in an embed with that chosen color.

EMBED COLOR SCHEME SHOULD BE SETTABLE BY GUILD FOR ALL EMBEDS. THIS SHOULD BE EASY FOR THEM TO SET. Such as a command “!gset color blue”. Colors should be:

Red (255,0,0), Rose(255,0,127), Magenta(255,0,255), Violet(127,0,255), Blue(0,0,255), Azure(0,127,255), Cyan(0,255,255), Aquamarine(0,255,127), Green(0,255,0), Chartreuse(127,255,0), Yellow(255,255,0), Orange(255,127,0), Black(1,1,1), Dark-Gray(49,79,79), Gray (127,127,127), None(255,255,255)

Default for all guilds should be Gray

Information stored in Guild database.

ENHANCEMENT - Auto-Delete Command PER GUILD

MODULE - Admin
GROUP – Settings
PERMISSION – Admin
COMMAND - "set autodelete"
ALIAS -
DESCRIPTION – Turn on or off autodeletion of commands issues by mods, users, or everyone

COMMAND - set autodelete - This will list what setting the guild has. Options are: None, Everyone, Moderator, User

set autodelete (option) - will immediately set deletion of commands to whatever the option is the person uses (options are: None Everyone Moderator or User)

EXAMPLE: if set to moderator, if a moderator uses:
!ban (user) being a jerk
Siotrix will execute the command, then immediately delete the command. Guilds like to use this so its not so "spammy" in chat.. deleting those messages looks cleaner.

EXAMPLE2: If set to everyone, if a user does:
!invite
Siotrix will execute the command, then delete the !invite

COMMAND - Leaderboard

NOTE GUILD SPECIFIC

MODULE - Statistics
GROUP - N/A
PERMISSION - EVERYONE
COMMAND - "leaderboard"
ALIAS - "lb"
DESCRIPTION - Guild leaderboard based on message count for the last 30 days, and for ALL TIME

COMMANDS - leaderboard (no argument) - gives the top 25 message users for the last 30 days in that guild, much like AnalyticsBot (/leaderboard)

leaderboard alltime - gives the top 25 messages for users for ALL TIME in that guild

General Layout:

withauthor(iconurl,withname,withurl) - guild defined
withcolor(color) - guild defined as in Issue #6
withthumbnailurl(url) - guild defined

withtitle ("Current Leaderboard for {GuildName}")
withdescription ("Last 30 days") NOTE - if command was "leaderboard alltime" it will say "All Time"

Body can look just like Analytics Bot:

  1. username1 2) username2 3)username3
    400 messages 390 messages 250 messages

  2. username4 5) username5 6) username6

NOTE all the way to 25

withfooter(withiconurl, withtext) - guild defined
(withtimestamp)

Message tracking into mySQL

Start tracking all message numbers in MySQL:

Message data should store (core / entities / modules / statistics / discord messages):

public class DiscordMessage : Entity { [Required, Timestamp] public DateTime CreatedAt { get; set; } public DateTime? DeletedAt { get; set; } public long? GuildId { get; set; } public long? ChannelId { get; set; } [Required] public long MessageId { get; set; } [Required] public long AuthorId { get; set; } public string Content { get; set; } [Required] public string Name { get; set; } }

Globally:

Number of messages done in all channels of all guilds since bot started:
Number of messages deleted in all channels of all guilds since bot started:

Per Guild:

Total Number of Guild Messages (lifetime):
Total Number of Guild Messages (last 30 days):
Most active Channel this month:

Per User:

Total number of messages in all guilds Siotrix is connected to:
Total number of messages in all guilds Siotrix is connected to last 30 days(reset after 30 days)
Total number of messages in all guilds Siotrix is connected to last 7 days ("rolling" 7 days NOT a reset)
Messages / hour lifetime(can be worked out from user join date / number of messages): NOT STORED

For each guild each user should store his info:
Messages this Month(resets monthly) for that guild:
Messages / hour this Month(can be worked out from number of messages this month): NOT STORED
Messages This Week(resets weekly) for that guild:
Messages Today(resets daily) for that guild:
Most Active Day this week (last 7 days) (ongoing "rolling" 7 days) for that guild:
Most Active Hour on that day(from the last 7 days):
Most Active Channel (last 7 days last 30 days and lifetime):

COMMAND - Info Information

GROUP - N/A
PERMISSION - EVERYONE
COMMAND - "info"
ALIAS - "information"
DESCRIPTION - General information command to display guild, user info, and bot info

NOTE settable properties must be regulated on character counts. Suggest a “process character count” function each time using any embed settings. If person sets a field, and it exceeds a max, it should give them a warning and not save. This should cycle through ALL guild settings for the embed, and make sure total has not been exceeded as well.

field amount = 25, title/field name = 256, value = 1024, footer text/description = 2048 Note that the sum of all characters in the embed should be less than or equal to 4000.

COMMANDS - info (no argument) - gives general information about guild
info (username) - gives general information about user - if username is bot, global bot information

General Guild Stats Format:

withauthor(iconurl,withname,withurl) - guild defined
withcolor(color) - guild defined as in Issue #6
withthumbnailurl(url) - guild defined

withtitle ("General Information sheet for {GuildName}")
withdescription (GUILD DESCRIPTION)

Name = Server Owner Name = Guild Established Name=Roles
Value = (server Owner) Value =(guild.joined_at (XXXX days old!)) Value=(number of roles)

Name = Member Count Name = Bot Count Name = Channel Count
Value = (number of members) Value = (Number of Bots) Value = (number of channels)

Name = Avatar URL
Value = (Avatar URL)

Name = "For guild statistical data type {prefix}stats"
Value = "Uptime: (bot uptime)"

withfooter(withiconurl, withtext) - guild defined
(withtimestamp)

User Stats Format

withauthor(iconurl,withname,withurl) - guild defined
withcolor(color) - guild defined as in Issue #6
withthumbnailurl(url) - User Avatar

withtitle ("General Information sheet for {UserName})
Name = ID: Value = playerID
Name = Nickname: Value = nickname
Name = Past Names: Value = (past names)
Name = Avatar: Value = (URL)
Name = Playing: Value = (Activity)
Name = Status: Value = (status)

Name = Joined Server Name = lifetime messages Name=Messages / hour
Value = (joined date) Value =(lifetime messages) Value (messages / hour)

Name = Joined Server: Value = (presenttime - joined date(database))
Name = Last Seen: Value = (time last seen(database))
Name = Last Spoke: Value = (time last spoke(database))
Name = Roles: Value = (Guild Roles)

withfooter(withiconurl, withtext) - guild defined
(withtimestamp)

Bot Stats Format

withauthor(iconurl,withname,withurl) - SIOTRIX INFO
withcolor(color) - guild defined as in Issue #6
withthumbnailurl(url) - SIOTRIX THUMBNAIL

withtitle ("Information for Siotrix Bot")
withdescription (SIOTRIX DESCRIPTION - DATABASE)

Name = Owner Name = Guilds Name=Users
Value = {BotOwner} Value =(number of guilds) Value (Total Users)

Name = invite to guild Name = Siotrix Guild Name = Donate
Value = (invitelink) Value = (guild link) Value = (Donate Link)

Name = Created: Value = (present date - creation date(database))
Name = Icon: Value = (URL)
Name = Most Active Guild This Week: Value = (Guild Leader Name)
Name = Uptime: ###y###d###h###s

Name= Contrubutors
Value = (list of contributors -- like FORNEWWORLD!!! ;) )?
withfooter(withiconurl, withtext) - SIOTRIX FOOTER
(withtimestamp)

COMMAND - Command set (toggles for on/off and channels) **PER GUILD**

This command is a setting PER GUILD

NOTE help command should be done first!!!

MODULE - Admin
GROUP - cset
PERMISSION - Guild Administrators
COMMAND - "cset"
ALIAS - commandset
DESCRIPTION - Command to toggle channels on and off as well as set commands to certain channels only within a GUILD

COMMANDS - cset - does nothing - command must have arguments

cset (module name) - Will list all commands inside of the module, and list whether they are on or off for that guild.

cset toggled - will list all commands currently toggled off. It will also list other commands with special channel permissions and let the user know to type "cset (command) to get specific information on the command"

example:
Commands Disabled:
leave ban kick
Commands with special channel permissions:
help info stats
-please type (guild prefix)cset (command name) to get specific channel permissions of that command

cset (command) - Will list summary of the command, including:

  • If command is on or off for guild
  • If command is turned off for specific channels, or set to only a specific channel

cset (command) toggle - Toggles a command on or off for that users guild

cset (command) togglechannel (channel) - Toggles a command on or off for that users guild in a specific channel

cset (command) channelonly (channel) - Sets command to only be used in a specific channel (it will auto toggle all other channels to off).

special notes - If a guild channel no longer exists when a person types the cset command, it should update the guild database and remove the channel from the toggle list.

SPECIAL FEATURES

If a command is used, and it is set to only 1 channel in the guild, it should notify the user to use the command in the channel its authorized to be used in

If a command is user, and it is disabled for that channel (but still ok to use in multiple channels) it should let the user know that the command has been disabled for that channel

If a command is completely toggled off, it should act like the command does not exist, and should not show up in help commands or anywhere else with the exception of the cset toggled command

database - Bot Website

GROUP - SIOTRX MODULE (master command "Siotrix")
PERMISSION - BOT OWNER
COMMAND - "website"
Description: Master website for Siotrix Bot

COMMANDS - "siotrix website" - list current bot website url

"siotrix website (website)" - changes website to inputted site if it is a valid URL

COMMAND – Logging and Moderation channel **PER GUILD**

These commands will set up what channel moderation logs should be in. This is a channel all guilds MUST set when bot comes in before any moderation will work properly.

MODULE - Admin
GROUP – Settings
PERMISSION – Guild Owner
COMMAND - "set logchannel" “set logmodchannel” “reason”
ALIAS -
DESCRIPTION – Logging channels – this is where all moderation and other important logs will be placed when actions happen. This is anything from a person deleting a message to admin banning a person.
When a person is determined to be spamming, it will issue a warning point. If it issues a warning point, it will send information to the guilds logging channel.
All moderated logs should have case numbers, and reasons should be able to be added to those case numbers.
Example for LOGMODCHANNEL:

Case 2 | Kick  
User: GlobalAspect (265337121764671488)
 Moderator: Gynthazi (173905004661309441) 
Reason: testing something(edited)

If a Mod does something like kick someone, and gives no reason, it will log it to the logging channel, assign a case number, and notify the mod to give a reason.
Mod can update case with reason command.

Exampe: !reason 2 He was annoying a lot of people in guild.

If its automated log, like from spam filter, or from filter system, it will still do a case number and auto
generate a reason. Example:

Case 26 | Language Filter (automated)  
User: GlobalAspect (265337121764671488)
Points Awarded: 1
Reason: User said: “You people fucking suck”(edited)

Picture examples:
picture

COMMANDS - ADMINISTRATOR COMMAND
logs logchannel -- this will display the current logchannel for the guild, and whether the logchannel is active or not -- this should default to OFF
logs logchannel (#channel) – will officially set the detailed logging channel.
logs logchannel toggle -- will turn on or off logchannel

logs modlogchannel -- this will display the current modlogchannel for the guild, and whether the modlogchannel is active or not -- this should default to OFF
**logs modlogchannel (#channel) – will officially set the mod log channel that does the cases.
logs modlogchannel toggle - will turn on or off modlogchannel

COMMANDS -- Moderator command
reason (case number) (reason text) – will update a case inside the logging channel with a reason.

Logging channel is also a place where it will announce when bot does important things, like delete’s a message and what the message was. If a person deleted. If a person is assigned a new role, it should log that, if a person deletes a message it should log that and list what the message was. This channel will show a lot of info, so its better for guilds to use a separate mod log channel for cases.
Example for Log Channel:
picture
picture

NOTE - guilds have the options to set both logging channels to the same channel if they choose. This is fine.
Summary:
ModLog channel will list all cases done by moderators, and official cases done by bot such as filter and spam warnings
Logchannel will list ALL OTHER ITEMS like if a person leaves the guild, joins the guild, deletes a message and what it was, gets a role assigned to them, etc.

database - Guild Name

GROUP - SETTINGS MODULE
PERMISSION - GUILD OWNER
COMMAND - "gname"

COMMANDS - "settings gname" - list current name for guild

"settings gname (name)" - updates database with a display name for guild to use in various information displays such as "info" command

"settings gname reset" - will reset guild name to current guild name

database - Bot info

GROUP - Siotrix MODULE "siotrix"
PERMISSION - BOT OWNER
COMMAND - "info"
String Limit - 1200
Description: Text block information about bot to be printed on info screen when command is called.

COMMANDS - "siotrix info" - lists current information in this field.

"siotrix info (info)" - updates database with entered text for the info field.

Guild Announcements - PER GUILD

MODULE - Administration
GROUP - Announcements
PERMISSION – Administrator
COMMAND - "announcement"
ALIAS - "ann" "announce"
DESCRIPTION – Announcement Module - We want to give guilds the option to do announcements when people joined the server, and when people leave the server as well as when people return to the server who used to be a part of it. Guilds should be able to to build custom messages for each of these situations. They should be able to use custom variables to make it custom. Guild admins should be able to set this to either a channel OR DM (direct message)

Here are some examples of custom variables:

  • {user} - the user calling the command example: Hello {user}!
  • {server} - the server name
  • {channel} - the channel name
  • {@user} - mention a user by their username (not nickname), replace user with username.
  • {&role} - mention a role by name, replace role with the role name. Ex: {&Gamers}, We're streaming now!
  • {#channel} - a channel link, replace channel with the name of the channel you want to link. Ex: Use {#testing} for all bot testing.

If you have other ideas for variables, please include them!

Commands - administrator
announcement - doing !announcements will list the three options, whether they are active or not, and whether they are set up to DM or announce in a channel.

Display as such:
(embeded with normal guild embed)
embed title: Announcements for
(inline)embed.name: Welcome: embed.value: On
(inline)embed.name: Welcome Channel: embed.value: #general
(inline)embed.name: Return: embed.value: On
(inline)embed.name: Return Channel: embed.value: Direct Message
(inline)embed.name: Leave: embed.value: Off
(inline)embed.name: Leave Channel: embed.value: #general

NOTE if announcement is turned off, it will still list the channel its set to

announcement welcome toggle - turn welcome message on or off
announcement leave toggle - turn leave message on or off
announcement return toggle - turn return message on or off

announcement welcome set (text) - set the welcome text for the guild using any phrase they want including coded variables.
announcement leave set (text) - set leave message for guild(similar to welcome)
announcement return set (text) - set return message for guild(similar to welcome)

announcement set (channel) - set the channel for announcements in the guild

NOTE its ok if all announcements are in same channel. We do not need 3 separate channel storages

announcement welcome dm - will make the set the welcome message able to send DM to user or to channel on or off
announcement leave dm - will make the set the leave message able to send DM to user or to channel on or off
announcement return dm - will make the set the return message able to send DM to user or to channel on or off

NOTE Announcement will be EITHER DM or channel, not both

COMMAND - Spam System **PER GUILD**

This command and spam module are PER GUILD – this means you may not give warning points to a user in one guild, and it would affect them in another guild the bot is in. Should be able to turn this on or off for a guild.

MODULE - Moderation (SpamModule.cs)
GROUP - spam
PERMISSION – Administrator
COMMAND - "spam"
ALIAS -
DESCRIPTION – Spam Module – uses advanced Heuristics to determine if a person is spamming in guild. Spam module should be able to be turned on and off and settable by guild. Warning points are assigned to person that spams.

When a person is determined to be spamming, it will issue a warning point. If it issues a warning point, it will send information to the guilds logging channel.
Modules/Siotrix.Discord.Moderation/Modules/
SpamModule.cs

NOTE Mute, Warning, and Logging Issues should be done before this one.

NOTE -- There is a bot that does this well, and I think we could incorporate a lot of that code. Would you please look at: github

This is based off of the same bot base. We would need to redo it for Siotrix, and of course it uses a website as well which we do not need to do.

At the very least, we need to detect if a person is spamming the same message over and over, and if a person is spamming messages too fast. If we can incorporate a lof of those features though, this would be great!

COMMANDS - Public
spam – will display spam settings of guild

COMMANDS - Administrator
spam set repeatspam - sets how many of the exact same message will need to repeat before awarding a warning point.
spam mute repeatspam - sets how many of the exact same message will need to repeat before instantly muting the person.
spam mutetime repeatspam - sets how long to mute the person instantly if they hit the "mute repeatspam" amount.
spam set capsspam - sets how many messages a person sends in all capital letters before awarding a warning point
spam mute capsspam sets how many messages a person sends in all capital letters before instantly muting the person.
spam mutetime capsspam - sets how long to mute the person instantly if they hit the "mute capsspam* amount

COMMAND - Stats Statistics

GROUP - N/A
PERMISSION - EVERYONE
COMMAND - "stats"
ALIAS - "statistics"
DESCRIPTION - Statistical command to display guild information and user information on message and channel data.

NOTE settable properties must be regulated on character counts. Suggest a “process character count” function each time using any embed settings. If person sets a field, and it exceeds a max, it should give them a warning and not save. This should cycle through ALL guild settings for the embed, and make sure total has not been exceeded as well.

field amount = 25, title/field name = 256, value = 1024, footer text/description = 2048 Note that the sum of all characters in the embed should be less than or equal to 4000.

COMMANDS - stats (no argument) - gives stat information about guild
stats (username) - gives stat information about user - if username is bot, global bot stat information

General Guild Stats Format:

withauthor(iconurl,withname,withurl) - guild defined
withcolor(color) - guild defined as in Issue #6
withthumbnailurl(url) - guild defined

withtitle ("Statistical Information sheet for {GuildName})
withdescription ("for individual information or bot information please use {prefix}stats @username")

Name = Number of Members Name = lifetime messages Name=Messages / hour
Value = (Member Count) Value =(lifetime messages) Value=(Messages/hour)

Name = Number of channels: Value = (channel number)
Name = Most Active Channel: Value = (channel)
Name = Lifetime message deletes: Value = (deleted messages in guild)

Name = Messages Month Name = Messages Week Name = Messages Day
Value = (messages month) Value = (messages week) Value = (messages day)
Name = Most Active Channel this week: Value = (active channel week)
Name = Time most active on that day: Value = (active time this week)

withfooter(withiconurl, withtext) - guild defined
(withtimestamp)

User Stats Format

withauthor(iconurl,withname,withurl) - guild defined
withcolor(color) - guild defined as in Issue #6
withthumbnailurl(url) - User Avatar

withtitle ("Statistical Information sheet for {UserName})
withdescription ("for general guild information information please use {prefix}stats")

Name = Joined Server Name = lifetime messages Name=Messages / hour
Value = (joined date) Value =(lifetime messages) Value (messages / hour)

Name = Messages Month Name = Messages Week Name = Messages Day
Value = (messages month) Value = (messages week) Value = (messages day)

Name = Most Active Channel: Value = (channel)
Name = Most Active Channel this week: Value = (active channel week)
Name = Most Active Day this week: Value = (active day)
Name = Time most active on that day: Value = (active time this week)

withfooter(withiconurl, withtext) - guild defined
(withtimestamp)

Bot Stats Format

withauthor(iconurl,withname,withurl) - SIOTRIX INFO
withcolor(color) - guild defined as in Issue #6
withthumbnailurl(url) - SIOTRIX THUMBNAIL

withtitle ("Statistics for Siotrix Bot")
withdescription ("for general guild information information please use {prefix}stats")

Name = Number of Guilds Name = lifetime messages Name=Messages / hour
Value = (Guild amount) Value =(Global messages) Value (Global messages / hour)

Name = Messages Month Name = Messages Week Name = Messages Day
Value = (Global messages month) Value = (Global messages week) Value = (Global messages day)

Name = Number of Channels: Value = (global channel amount)
Name = Number of Users: Value = (global user count)
Name = Most Active Guild This Week: Value = (Guild Leader Name)
Name = Uptime: ###y###d###h###s

withfooter(withiconurl, withtext) - SIOTRIX FOOTER
(withtimestamp)

database - Guild FooterText

GROUP - SETTINGS MODULE
PERMISSION - GUILD OWNER
COMMAND - "gfootertext"
CHARACTER LIMIT: 100

COMMANDS - "settings gfootertext" - list current footer text

"settings gfootertext (text)" - updates database with text for the footer

"settings gfootertext reset" - will reset guild footertext to Siotrix footer text

database - Siotrix footer text

GROUP - SIOTRX MODULE (master command "siotrix")
PERMISSION - BOT OWNER
COMMAND - "footertext"
Description: Footer Icon for Siotrix Bot

COMMANDS - "siotrix footertext" - list current footer text for Siotrix

"siotrix footertext (text)" - updates database with footer text for Siotrix

database - Guild Avatar

GROUP - SETTINGS MODULE
PERMISSION - GUILD OWNER
COMMAND - "gavatar"

COMMANDS - "settings gavatar" - list current avatar for guild
NOTE this will NOT update bot avatar - this is only avatar for embeds.. bot avatar is global for all guilds and is set by Siotrix staff

"settings gavatar (URL)" - updates database with a URL address avatar for guild to use in various information displays such as "info" command

"settings gavatar reset" - will reset guild name to Siotrix avatar (should be the bots global avatar address in database)

database - Guild prefix

Group - SETTINGS MODULE
PERMISSION - GUILD OWNER
COMMAND - "prefix"

Configurable prefix per guild

Default prefix @mention and !
NOTE @mention should always be active regardless of guild preset

COMMANDS - "settings prefix" - lists current prefix. If never set will list bot prefix (!)

"settings prefix (prefix) " - updates database with prefix set by user. Ability to either be 1 character or a string of characters would be great, but if easier to make it just 1 character thats ok.

NOTE Prefix must be a special character.. no numbers or letters allowed.

"settings gthumbnail reset" - will reset guild prefix to bot prefix (which is !)

database - Siotrix footer icon

GROUP - SIOTRX MODULE (master command "siotrix")
PERMISSION - BOT OWNER
COMMAND - "footericon"
Description: Footer Icon for Siotrix Bot

COMMANDS - "siotrix footericon" - list current footer icon URL for Siotrix (with picture)

"siotrix footericon (URL)" - updates database with a URL address footer icon for Siotrix

COMMAND - WARN System **PER GUILD**

This command and warnings are PER GUILD – this means you may not give warning points to a user in one guild, and it would affect them in another guild the bot is in. Should be able to turn this on or off for a guild.

MODULE - Moderation ( WarningModule.cs, WarnModule.cs)
NOTE CHANNEL LOGGING, SPAM MUDULE, FILTER MODULE, AND MUTE COMMAND SHOULD BE IMPLEMENTED BEFORE THIS MODULE
GROUP - warn
PERMISSION – User (WarningModule) Moderator(WarnModule)
COMMAND - "warn"
ALIAS -
DESCRIPTION – Warning system – integrated warning system set up for Discord guilds that is completely customizable to be off, all the way to very strict. Warnings will have users get points when they do something wrong, either automatically from things like saying bad words and triggering the filter system or spamming a channel repeatedly, to manually where a mod will award them a warning point. Once a user has enough points, he is muted from speaking in the guild chat (all channels) by adding a “muted” role for X amount of time (time to be determined by guild).
If the user persists, that user can be temporarily banned from guild. When this happens, a SERIOUS INFRACTION is assigned to the user. If that user accumulated enough serious infractions, that user is PERMENENTLY BANNED from guild.

NOTE mute command should be implemented before this module – see Mute Command in issues if not completed.

STORAGE - Warn is PER GUILD per user. Unique to each Guild. – put inside user database per guild, or inside guild with user info? Whatever will be faster.

SCENARIO – User has 9 warning points, and guild has set a mute of 1 week to be at 10 warning points. User decided to break filter, and is assigned the 10th point. User will be notified they have been muted for 1 week from the guild, and assigned the muted role so they cannot speak. Users points stay at 10, and decrease at a rate set by guild (for instance, remove 1 point every 5 days).
When 1 week has passed, that user is dm’d that their mute time is up. It is notified in the logging channel that Siotrix has unmuted them, and their warning points are cut in ½ rounded lower (if total points it 10, they now have 5.. if guild total points is 7 they now have 3.).

Files presently in use for this:
Siotrix.Core - /entities/modules/moderation/
Filter.cs

Modules/Siotrix.Discord.Moderation/Modules/
WarningModule.cs
WarnModule.cs

Modules/Siotrix.Discord.Moderation/Services/
WarningService.cs

Siotrix.Discord/Services/
ServiceManager.cs

NUGET ADDON REQUIRED - https://github.com/foxbot/Discord.Addons.InteractiveCommands
NOTE - examples are in the source

COMMANDS
PUBLIC COMMAND (For USERS) – WarningModule.cs NOTE some commands are only for mods in this.
warning - This command will check current warning level, and notify user of what the max warning is for that guild as well as what the “falloff” rate is (i.e. 4 days per point). This will also do a list of warnings with reason, and their ID number and let them know they can use warning (id) to see more detailed information.
Example:
Active Warnings for Gynthazi
ID points date/time type of infraction

  1.   1       4/5/2017 3:25PM            Filter infraction
    
  2.   1       4/4/2017 12:35PM         Filter infraction
    
  3.   2       4/2/2017 9:13PM          Manual Infraction
    

Total Points Active: 4
Guild Max: 10 Guild Falloff Time: 4 Days

warning (user) -NOTE Mod+ only** - When a mod uses this they are able to look up detail of other users. It will list all of the information above, but on top of this it will list
last 10 warnings, even if not active any longer
Total guild warning points: 24
Last date muted (if has been muted before): 3/12/2017 3:57PM
warning (user) (id) - NOTE Mod+only – when a mod or admin uses this command for another person, it will give details of that infraction. If it was a filter infraction it will list what the person said, if it was a manual infraction it will list what the reason was the mod did it, and it will say who the mod was.
Example 1(filter infraction):
Infraction for Gynthazi
4/4/2017 12:35PM filter Infraction
Gynthazi wrote: “I don’t give a fuck what you say”
Awarded 1 point for infraction automatically.
Point will wear off in 12hours 56minutes and 38seconds

Example 2(manual infraction):
4/2/2017 9:13PM Manual infraction awarded by Fornewworld
Reason: Kept bothering me about writing more code!!!
Points awarded: 2
Points will wear off in 36hours 12minutes 15seconds

warning (datefrom) (dateto) - This command will list all ACTIVE warnings between the two dates supplied. Similar printout as above, just only between the two dates.

warning (id) - This will list specific information about a warning, just like a Mod can do, but a player can only look up their own infractions

MODERATOR COMMAND
warn - this will show current warning settings in this guild
Example:
Warning settings for (guild name)
<Warnings are turned ON!
Max number of warnings before a XX time(guild settable) mute: XX(guild settable number)
Max number of warnings before a XX time(guild settable) ban: XX(guild settable number))
Max number of serious offenses before a permanent ban: XX(guild settable number)
Rate at which warning points fall off a member: XX time (guild settable number)>

warn toggle - this command will turn on and off the warning system
warn (user) (level..int) (reason…string) - This command will award warning point(s) to user, and give reason. It will store that in the database with date/time, and will log it into the assigned logging channel.
Forgive (user) - This command will forgive ALL active warnings, and reset their active warnings to 0. NOTE - this will NOT remove and SERIOUS INFRACTIONS - log it into the assigned logging channel
Forgive completely (user) – This command will forgive ALL active warnings, and reset warnings to 0. This will also remove all SERIOUS INFRACTIONS - log it into the assigned logging channel
warn set mutewarn -- number of warnings before user is muted
warn set mutetime -- time person is muted for when it hits warning number
warn set banwarn - number of warnings before user is temporarily banned
warn set bantime - time person is banned for when it hits ban number
warn set permban - number of SERIOUS INFRACTIONS before person is permanently banned

database - Guild footer Icon

GROUP - SETTINGS MODULE
PERMISSION - SERVER OWNER
COMMAND - "gfootericon"

COMMANDS - "settings gfootericon" - list current footer icon URL for guild (with picture)

"settings gfootericon (URL)" - updates database with a URL address footer icon for guild to use in various information displays such as "info" command

"settings gfootericon reset" - will reset guild footericon to Siotrix Thumbnail (should be the bots global thumbnail address in database)

database - Guild MOTD

GROUP - SETTINGS MODULE
PERMISSION - GUILD OWNER
COMMAND - "gmotd"
CHARACTER LIMIT - 500

COMMANDS - "settings gmotd" - list current motd for guild

"settings gmotd (message)" - updates database with a URL address thumbnail for guild to use in various information displays such as "info" command

"settings gthumbnail reset" - will reset motd to "Welcome to ." (guild name settable from database)

NEW EXTENSION - Quick Embed

Function: QuickEmbed (String text, bool extended = false)
description: a quick embed for fast replyasyncs utilizing guild formatting such as guild embed color. If extended is false(or not included), it only embeds the message with guild embed color.

Extended Embed should include:
Guild embed color
.WithAuthor(new EmbedAuthorBuilder()
.WithIconUrl("SETTABLE BY GUILD – DEFAULTS TO SIOTRIX ICON")
.WithName("SETTABLE BY GUILD – DEFAULTS TO GUILD NAME")
.WithUrl("OPTIONAL URL SETTABLE BY GUILD DEFAULTS TO OFF/empy"))

WithFooter(new EmbedFooterBuilder()
.WithIconUrl("SETTABLE BY GUILD")
.WithText("SETTABLE BY GUILD"))
.WithTimestamp(DateTime.UtcNow));

COMMAND REWORK - HELP

MODULE - Utility
GROUP - Utility
PERMISSION - Everyone
COMMAND - "Help"
ALIAS -
DESCRIPTION - Re-worked help command, described below

SPECIAL OVERALL NOTES

When a person uses help, help will only display commands that the person can use. If they do not have permission to use the command it should never show up for them at all.

COMMANDS - help - Will list all modules that a user can use for Siotrix

special notes - Modules -- Modules should be pulled my the "name" prefix ( [Name("Admin")]

Code should search through all commands, and organize modules by the Name prefix first.

Display
This should use the standard display with all of the guild headers and footers and thumbnail


help (module name) - Will list all commands for that specific module that a user can use

special notes - list of commands should list the "summary" portion
Example (if user is a guild owner):
Admin:
Leave - Instructs the bot to leave this Guild.

Display
This should use the standard display with all of the guild headers and footers WITH NO thumbnail


help (command) - Will list the summary and remarks for a command if the user is able to use that command.

special notes - specific command information
Example(if user is a guild owner):
user types: help requesthelp
displays:
Command Help:
Module: Admin
Command: requesthelp
Summary:
Gives bot developer an alert that something is wrong, and an invite to the guild to provide assistance. Please use this only as emergency
Usage: (guildprefix)requesthelp - include a brief report

Display --
This should use the standard display with NO headers/footers It SHOULD use thumbnail


SPECIAL ADDITIONS

If a player types a command, and the command is right but that player has not used all of the arguments, it should send help on that command

database - Guild Description

GROUP - SETTINGS MODULE
PERMISSION - GUILD OWNER
COMMAND - "gdescription"
ALIAS "gdesc"
CHARACTER LIMIT - 1200

COMMANDS - "settings gdescription" - list current description for guild. If first time, let them know description has not been set.

"settings gdescription (description)" - updates database with description for guild to use in various information displays such as "info" command

COMMAND ENHANCEMENT - leaveguild

MODULE - LeaveGuildModule
GROUP - Developer
PERMISSION - Bot Owner(Developer)
COMMAND - leaveguild
ALIAS -
DESCRIPTION - leaveguild is an already existing module that needs to addition of being able to ban, list banned, and unban guilds(servers).

Commands - Developer
leaveguild banlist - lists all guilds, guild ID's, and names of guilds banned in order with number. The number will be used to unban if desired.
Example:

  1. badguild - 234255234234 - malicious bot use
  2. otherbadguild - 43563423423423 - trying to crash bot with spam
  3. thisisanotherguildname - 43583475398475 - Owner of Guild was abusive to Siotrix Devs.

leaveguild guildban (guildID) (reason text)- bans a guild from being able to join the server. Store the Guild ID, and the reason text.
leaveguild guildunban (number) - can either enter a guild ID or a number from the banlist. This will unban the guild (remove them from the list)

NOTE If guild is on the ban list, and a server invites Siotrix, Siotrix notifies the general chat the reason it is not allowed to be there, tells them to notify the developers and gives the link to siotrix discord.

Use Siotrix Embed (headers, footers)
Title: Unauthorized Guild
Example if banned: embed.description: Hi, thank you for inviting me to the server. Unfortunately I am not able to stay as you have been added to my banlist. Reason: (reason text when banned).
(inline)embed.name: If you have questions, feel free to join our Discord at: embed.value: (Siotrix discord link)

COMMAND – MUTE MODULE System **PER GUILD**

This command is PER GUILD – this means you may mute a person, but it only affects THAT GUILD

MODULE - Moderation ( MuteModule.cs)
NOTE CHANNEL LOGGING SHOULD BE IMPLEMENTED BEFORE THESE MODULES
GROUP - mute
PERMISSION – Moderator
COMMAND - "mute”
ALIAS –
DESCRIPTION – Mute – Muting a person will make it so they are able to see all messages in channels they have permission, but are not able to speak. This requires that a role is set up for each guild that uses mute(auto-set up by bot), and assigned the role when muted, and unassigned the role when unmuted.

STORAGE – is_muted should be assigned to a person per guild. If they are muted for that guild its “true” if not, then its “false” – this will protect someone from leaving the guild, dropping the muted role, and coming back into guild without mute flag.

If person does this, the bot should see they are muted, and auto-assign the role.

MuteTimer – this should also be assigned to each person per guild, and can be a time/date stamp on when the bot will unmute that person for that guild. Once that date/time arrives the bot will set is_muted to false, and remove the role for that guild off the user.

SCENARIO – User triggers the warning module, and gets max points. User gets auto-muted, notified they are muted and for how long, logged in logging channel, and time is set on when they will be unmuted.

Files presently in use for this:
Modules/Siotrix.Discord.Moderation/Modules/
MuteModule.cs

COMMANDS
mute – using mute command with any arguments will first check if there is a mute role in guild. If there is not it will create one, and set appropriate permissions so user may not send messages.
If the mute role exists and person only types mute, default help text will come up (see help command in issues)
mute list – will list all players muted in guild, and how much time they have left
mute (player) (time) – will mute a person for X amount of time (using timespantypereader.cs) – can be minutes, hours, days, weeks…
unmute (player) – will remove mute role from user

database - Guild Website

GROUP - SETTINGS MODULE
PERMISSION - GUILD OWNER
COMMAND - "gwebsite"
ALIAS - "gweb"

COMMANDS - "settings gwebsite" - list current website for guild (default is Siotrix database)

"settings gwebsite (URL)" - updates database with a URL address website for guild to use in various information displays such as "info" command

"settings gwebsite reset" - will reset guild website to Siotrix website (from database)

COMMAND - FILTER System **PER GUILD**

This commands and filter are PER GUILD

MODULE - Moderation (FilterModules.cs)
NOTE CHANNEL LOGGING SHOULD BE IMPLEMENTED BEFORE THESE MODULES if you want, or add the channel logging features later.
GROUP - filter
PERMISSION - Guild Administrators for filter
COMMAND - "filter"
ALIAS -
DESCRIPTION - Create filters PER GUILD that will allow guilds to catch people using words OR PHRASES the guild does not feel appropriate for their guild. Bad language such as "shit" or "fuck" or maybe racially profiling words like "nigger" should be filtered out of text. Phrases such as "mother fucker" could also be entered and filtered if used.

NOTE - Filtered words and phrases should be separate words. for instance, if a filtered word in the list is RAPE we do NOT want someone to type GRAPE and be in trouble for it, only if they use the actual word, "RAPE".

NOTE 2 - filtered words should NOT be case sensitive. It should not matter how they enter the word or how the user types the word. Rape is the same as rape, as RaPe, as RAPE (you get my point).

STORAGE - Filter is PER GUILD - Will need to have database to handle a list for each guild. This list will be accessed constantly as every time someone chats, it will need to compare that guilds filter

SCENARIO - If a user uses a word that is on the filter list, that message is instantly deleted and LOGGED to the LogMod channel (see logging issue for information on that).

Files presently in use for this:
Siotrix.Core - /entities/modules/moderation/
Filter.cs
FilterConfig.cs
FilterPack.cs

Modules/Siotrix.Discord.Moderation/Modules/
FilterModule.cs

Modules/Siotrix.Discord.Moderation/Services/
FilterService.cs

Siotrix.Discord/Services/
ServiceManager.cs

NUGET ADDON REQUIRED - https://github.com/foxbot/Discord.Addons.InteractiveCommands
NOTE - examples are in the source

public async Task SayHello()
        {
            await ReplyAsync("What is your name?");
            var response = await WaitForMessage(Context.Message.Author, Context.Channel);
            await ReplyAsync($"Hello, {response.Content}");
        }

public async Task DeleteAfter()
        {
            await ReplyAsync("This message will destroy itself in 5 seconds", deleteAfter: 5);
        }

COMMANDS
filter - This command will send a DM(Direct Message) to user on what filters are in that guild. Filters should be toggle-able "on" and "off" -- it will notify the user of whether or not the filter is active in the guild or not.

filter toggle - This command will activate or deactivate the filter list for their guild. Default for a new guild should be OFF and not working.

filter add - This command will add a word to that guilds filter list if it is not already in there.

filter remove - This command will remove a word from that guilds filter if it is in there.

filter import - Siotrix should offer a "basic list" of bad words. when this command is used, it will import these words into the guilds filter list.
NOTE - If using filter import, this will RESET any list the guild has to the import list. - List will be provided but will be about 100 words and/or phrases. This should have interactive confirmation to verify they want to do this.

Example:

User types !filter import
Siotrix says "WARNING! You are about to import the siotrix default filter! This will delete any filters you have added for your guild, are you sure you want to do this?

user types yes

Siotrix imports filter and confirms with user.

filter reset - Filter will delete all other filters and reset it to 0 filters. This should have interactive confirmation to verify they want to do this. (yes/no)

ENHANCEMENT - Logging - PER GUILD

Siotrix needs to be able to do logging of various things that happen within a guild and report it to the guild on a specific channel NOTE - refer to #30 for enhancement on that.

These items would go to the logchannel that the guild has set.

Items needing to be tracked(important names next to log, see below for layout):
member joins -

**username#3424** (make it underlined?)
Embed: username (user ID#) has joined

member re-joins

**username#3424** (make it underlined?)
Embed: username (user ID#) has re-joined

member leaves

**username#3424** (make it underlined?)
Embed: username (user ID#) has left guild

member banned

**username#3424** (make it underlined?)
Embed: username (user ID#) has been banned by (moderator name)

member unbanned

**username#3424** (make it underlined?)
Embed: username (user ID#) has been unbanned by (moderator name)

message deleted

Embed: username (user ID#)'s message was deleted:
embed: (message that was deleted)

NOTE -- there is no way to see who deleted a message. Dont look, its not possible.

bulk message delete (cleanup module)

Embed: username (user ID#) has deleted X messages (X = number of messages deleted):

channel created

Embed: (#channel) has been created

NOTE - there is no was to see who created a channel unless it was done through a command

channel deleted

Embed: (#channel) has been deleted

role created

Embed: (role) has been created

role deleted

Embed: (role) has been deleted

role assigned to user

Embed: (role) has been assigned to username (user ID#)

role removed from user

Embed: (role) has been removed from username (user ID#)

nickname changes

**username#3424** (make it underlined?)
Embed: username (user ID#) has changed their nickname to (nickname)

username changes

**username#3424** (make it underlined?) <<<--- NEW USERNAME
Embed: username (user ID#) has changed their username to (username)

any manager/moderator commands used

Embed: username (user ID#) has used the (command) command:
embed: (full string this person used)

voice channel joins

**username#3424** (make it underlined?)
Embed: username (user ID#) has joined (voice channel) voice channel

voice channel leaves

**username#3424** (make it underlined?)
Embed: username (user ID#) has left (voice channel) voice channel

voice channel moves

**username#3424** (make it underlined?)
Embed: username (user ID#) has moved to (voice channel) voice channel

Roles should be as detailed as possible, but not large. when announcing a user to leave or join in the log, it should make their name "clickable" some moderator can right click and assign roles or whatever else they want. Example:

example

Embeds are ok, with guild color but no need for header or footers to keep the log small.
NOTE embeded names are not clickable, so must put name on a separate line

a look could be:
username#3424 (make it underlined?)
Embed: username (user ID#) has joined

database - Bot Nickname *MODIFICATION TO EXISTING*

NOTE Already existing command -- needs modification for storage

GROUP - SETTINGS MODULE
PERMISSION - Guild OWNER
COMMAND - "nickname"
ALIAS - "nick"

COMMANDS - "settings nickname" - shows bot's current nickname

"settings nickname (name)" - updates database with bots nickname and changes bots nickname

"settings nickname reset" - will reset bots nickname to Siotrix

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.