IReadOnlyCollection<SocketRole>userRolesEnum=guildUser.Roles;//Get User Roles
List<ulong>roleIdList=newList<ulong>();//Stores Role ID's of User
List<Permission>guildPermissionList=awaitPermission.readAllByGuildId(database.connection,context.Guild.Id);//Holds all permissions that are on this guild
foreach(SocketRoleroleinuserRolesEnum)
{
roleIdList.Add(role.Id);
}
IEnumerable<Permission>matchedPermissions=guildPermissionList.Where(permission=>roleIdList.Contains(permission.roleId));//Identify which Permission matches Role ID's
finalPermission=newPermission();
foreach(PermissionpermissioninmatchedPermissions)
{
//Analyze Permission. Hold Permission Attributes that have true as precedence over false
- .omg admin clean (No database support yet, it just deletes all channels starting with omeglechat)
- .omg admin setsessiontimeout NUMTimeSeconds
- .omg admin setmaxsessions NUMMaxChannels
***
### Planned Commands and description
## Normal Chat Commands
## Configuration Setup
<dt>After starting the bot, you must setup the config.json file. That you can find under Omegle-Discord-Bot/bin/{Debug_Or_Release}/netcoreapp1.1/</dt>
<p></p>
<dt>In "Owners" you enter your Client ID and seperate it by commas if you want to add more than just one owner</dt>
<dt>In "Token" you enter your App Bot User Token</dt>
<dt>In "BotClientID" you enter the Bot Client ID</dt>
<dt>In "MySQL_Host" you enter the Host Address for your MySQL Database</dt>
<dt>In "MySQL_User" you enter your MySQL User Handle</dt>
<dt>In "MySQL_Password" you enter your MySQL Password for the User Handle</dt>
<dt>In "MySQL_Database" you can enter a custom Database name that is being used on your MySQL Server</dt>
***
## Planned Commands and description
### Normal Chat Commands
|Command|Example Usage|Description|
|-|:-:|:-:|
|.omg chat [lang] [BOOLunmoderated] [topic1] [topic2]..|.omg chat en false swimming friends|Starts a public Omegle Chat. You wil be moved in a newly created Omegle Channel.|
|.omg chatp [lang] [BOOLunmoderated] [topic1] [topic2]..|.omg chat en false swimming friends|Starts a private Omegle Chat via Direct Messaging|
***
## Ask Question Commands
### Ask Question Commands
|Command|Example Usage|Description|
|-|:-:|:-:|
|.omg question [question]|.omg question How is the weather over there?|Starts a public question chat where you can 2 Strangers discuss your question. You wil be moved in a newly created Omegle Channel.|
|.omg questionp [question]|.omg questionp How is the weather over there?|Starts a private question chat where you can 2 Strangers discuss your question via Direct Messaging.|
|.omg question question|.omg question How is the weather over there?|Starts a public question chat where you can 2 Strangers discuss your question. You wil be moved in a newly created Omegle Channel.|
|.omg questionp question|.omg questionp How is the weather over there?|Starts a private question chat where you can 2 Strangers discuss your question via Direct Messaging.|
***
## Spyee Commands
### Spyee Commands
|Command|Example Usage|Description|
|-|:-:|:-:|
|.omg spyee|.omg spyee|Starts a public Spyee chat where you and others can discuss a question. You wil be moved in a newly created Omegle Channel.|
|.omg spyeep|.omg spyeep|Starts a private Spyee chat via direct messaging.|
***
## General Commands
### General Commands
|Command|Example Usage|Description|
|-|:-:|:-:|
|.omg end|.omg end|Ends your omegle session completely.|
|.omg reconnect|.omg reconnect|Reconnects you with other Stranger/s. Works also in direct messaging.|
***
## Admin Commands
### Admin Commands
### Require Bot owner, Guild owner, Admin role permission, or Permission with Administrator privilege
|Command|Example Usage|Description|
|-|:-:|:-:|
|.omg admin clean|.omg admin clean|Ends all Omegle sessions of your guild and removes the corresponding channels.|
|.omg admin listsesions|.omg admin listsessions|Lists all active sessions.|
|.omg admin endsession @User|.omg admin endsession @PHENOMICAL|Ends the session for the specified user.|
|.omg admin setsessiontimeout NUMTimeSeconds|.omg admin setsessiontimeout 30|After a stranger has disconnected, how long should the channel exist for reconnecting.|
|.omg admin setmaxsessions NUMMaxChannels|.omg admin setmaxsessions 10|Limits how many public chatrooms (Text channels) can be created. Set to 0 for infinite channels.|
|.omg admin setmode Chat/Question/Spyee BOOLEnabled|.omg admin setmode Question false|Determines wether certain modes can be used.|
|.omg admin setreconnectcooldown NUMTimeMilliSeconds|.omg admin setreconnectcooldown 1000|Determines how fast can a user reconnect. I suggest to leave this at >1000ms otherwise this bot may get's IP Banned.|
|.omg admin enablelogging BOOLEnabled|.omg admin enablelogging true|Enables writing a omeglebot_<DATE_TIME>.log|
|.omg admin setsessioncooldown NUMTimeSeconds|.omg admin setsessioncooldown 60| After a user has killed his session, how long does he need to wait before he can start a new one.|
***
### Moderator Commands
### Require Bot owner, Guild owner, Admin role permission, or Permission with atleast Moderator privilege
|Command|Example Usage|Description|
|-|:-:|:-:|
|.omg mod list [@user]|.omg mod list @PHENOMICAL| If @user is supplied, it lists information on that specific session, if not it lists all active sessions.|
|.omg mod endsession @user|.omg admin endsession @PHENOMICAL|Ends the session for the specified user.|
***
### Permission Commands
### Require Bot owner, Guild owner, Admin role permission, or Permission with Administrator privilege
|Command|Example Usage|Description|
|-|:-:|:-:|
|.omg perm list [@role]|.omg perm list @adminRole|[@role] Parameter is optional, but when given it lists the permissions on that role (use this when you want to know which permissions specifically are enabled to that role), otherwise it lists all permissions for your guild in a list style|
|.omg perm remove @role|.omg perm remove @adminRole| Removes a role from the permission system.|
|.omg perm add @role|.omg perm add @adminRole| Adds an role to the permission system.|
|.omg perm set @role NUMindex BOOLValue|.omg perm set @userRole 1 true| Set's a permission right.|
|.omg setroleright @role User/Moderator/Administrator|.omg perm setroleright @modRole Moderator| Set's a Role privilege on the permission.|
***
## Utility Commands
### Utility Commands
### Require Bot owner, Guild owner, Admin role permission, or Permission with atleast Moderator privilege
|Command|Example Usage|Description|
|-|:-:|:-:|
|.omg util status|.omg util status|Returns the total connections to Omegle, Ban status, Antinude percent, Spy queue time, Spyee queue time and Timestamp|