cordless icon indicating copy to clipboard operation
cordless copied to clipboard

Administration commands for the command system

Open intexisty opened this issue 6 years ago • 1 comments

What do you want

I really like how cordless has its command system setup, it just lacks some features. Adding administrative commands to cordless' command system would make Cordless an actual alternative to the native discord client for server administrators.

Why

The addition of administration on cordless would expand the user base of cordless and make cordless a viable alternative to discord's native client.

Implementation hints

I would personally like to have an 'Administration' category added to the command system. I've thought of a couple of "simple" commands

Command argument Replacement character
User Mention {mention}
Role Name {rolename}
Role Color {rolecolor}
Text Channel Mention {channelmention}
Voice Channel {voicechannel}
Channel {channel}
Text argument {text}
Time argument {Xd}
User Id {id}

Every admin command would start off with admin by default, should assume the current guild selected, and obey role hierarchy.

Nicknames

  • nick-set: syntax admin nick-set {mention} {text} - sets a nickname for a mentioned user - if no {mention} refer back to the current user logged in
  • nick-clear: syntax admin nick-clear {mention} - clears a nickname for a mentoned user - if no {mention} refer back to the current user logged in

Channels

  • chn-topic-set: syntax admin chn-topic-set {channelmention} {text} - sets a channel topic for a text channel - if no text argument entered clear the channel topic
  • chn-rename: admin chn-rename {channel} {text} - renames the first channel found with the given name - if no channel provided return, if no channel name provided return
  • chn-create-txt: admin chn-create-txt {text} - creates a text channel with the name provided - if no name provided return an error
  • chn-create-voice: admin chn-create-voice {text} - creates a voice channel with the name provided - if no name provided return an error
  • chn-delete-txt: admin chn-delete-txt {text} - deletes the first text channel found with the name provided - if no name provided return an error
  • chn-delete-voice: admin chn-delete-voice {text} - deletes the first voice channel found with the name provided - if no name provided return an error

Roles

  • role-rename: syntax admin role-rename {rolename} {text} - renames the first found role with the given name - if no roles found return an error, if no text provided return an error
  • role-mentionable: syntax admin role-mentionable {rolename} - makes the first role found with the given name mentionable or unmentionable - if no roles found return an error
  • role-visible: syntax admin role-visible {rolename} - makes the first role found with the given name visible on the user list or invisible
  • role-color: syntax admin role-color {rolename} {rolecolor} - changes the color of the first role found with the given name to whatever color is given
  • role-add: syntax admin role-add {mention} {rolename} - adds the first role found with the given name to the mentioned user
  • role-remove: syntax admin role-remove {mention} {rolename} - removes the first role found with the given name from the mentioned user
  • role-create: syntax admin role-create {rolename} {rolecolor} - creates a role with a given name and/or color. - if no color provided give default color, if no name provided return an error
  • role-delete: syntax admin role-delete {rolename} - deletes the first role found with the given name - if no role provided return an error

Misc

  • ban: syntax admin ban {id} {Xd} "{text}" OR admin ban {mention} {Xd} "{text}" - bans a given user - if neither an id or a mention is provided return an error, if no text argument provided put "" as banMessage, if no Time argument provided for discord to delete messages provide "" to discord
  • kick: syntax admin kick {id} {text} OR admin kick {mention} {text} - kicks a given user - if neither an id or a mention is provided return an error, if no text argument provided put "" as kickMessage

intexisty avatar Sep 29 '19 16:09 intexisty

I have already started implementing certain defaults regarding the commands. There is already a commangrouping. However, the grouping is done via parent commands that refer to children. For example server join actually calls server join and so on ...

Therefore I am against a parent command for all parent commands as of now, as it's quite verbose and doesn't seem to provide much value. However, we could add a manpage called admin-commands, server administration or whatever.

Looking at nick-set for example, it isn't really an admin command, as users with permissions can use it on themselves.

I am also not quite sure whether I want commands that take empty arguments such as admin kick, where the message is optional. I'd rather have kick -m "message" username_here.

Sorry for typos, I suck at typing on phone

Bios-Marcel avatar Sep 30 '19 14:09 Bios-Marcel