-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 933628b
Showing
63 changed files
with
12,757 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
token.php | ||
/vendor | ||
/_globals | ||
/users | ||
/guilds | ||
run.bat | ||
cmd.exe | ||
connect.php | ||
composer.lock | ||
palace_connect.php | ||
serverinfo.json | ||
tdm_veteran_mode.php | ||
veteran_mode.php | ||
tdm_linked_mode.php | ||
persistence_linked_mode.php | ||
nomads_veteran_mode.php | ||
nomads_linked_mode.php | ||
phpDocumentor.phar | ||
cmd.lnk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
//This information should match your Discord | ||
//Setting these allow for overriding certain role restrictions and grants immunities to certain commands such as ;ban or ;mute | ||
$creator_name = "Valithor"; | ||
$creator_discriminator = "5947"; | ||
$creator_id = "116927250145869826"; | ||
$creator_check = "$creator_name#$creator_discriminator"; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<?php | ||
$author = $message->author; //Member OR User object | ||
if (get_class($author) == "Discord\Parts\User\Member"){ | ||
$author_user = $author->user; | ||
$author_member = $author; | ||
}else $author_user = $author; | ||
if($author_member){ | ||
//Permissions granted by roles | ||
$user_perms = Array( | ||
'priority_speaker' => false, | ||
'stream' => false, | ||
'connect' => false, | ||
'speak' => false, | ||
'mute_members' => false, | ||
'deafen_members' => false, | ||
'move_members' => false, | ||
'use_vad' => false, | ||
|
||
'add_reactions' => false, | ||
'send_messages' => false, | ||
'send_tts_messages' => false, | ||
'manage_messages' => false, | ||
'embed_links' => false, | ||
'attach_files' => false, | ||
'read_message_history' => false, | ||
'mention_everyone' => false, | ||
'use_external_emojis' => false, | ||
|
||
'kick_members' => false, | ||
'ban_members' => false, | ||
'administrator' => false, | ||
'manage_guild' => false, | ||
'view_audit_log' => false, | ||
'view_guild_insights' => false, | ||
'change_nickname' => false, | ||
'manage_nicknames' => false, | ||
'manage_emojis' => false, | ||
|
||
'bitwise' => 0, | ||
'create_instant_invite' => false, | ||
'manage_channels' => false, | ||
'view_channel' => false, | ||
'manage_roles' => false, | ||
'manage_webhooks' => false | ||
); | ||
|
||
$author_member_roles = $author_member->roles; //Role objects for the author); | ||
|
||
foreach ($author_member_roles as $role){ //Check all roles for guild and channel permissions | ||
$permissions = json_decode(json_encode($role->permissions), 1); | ||
foreach ($permissions as $id => $perm) { | ||
if ($perm === true) $user_perms[$id] = true; | ||
//echo "id: " . $id . PHP_EOL; | ||
//echo "perm: $perm" . PHP_EOL; | ||
} | ||
/* | ||
if ($permissions->priority_speaker === true) $priority_speaker = true; | ||
if ($permissions->stream === true) $stream = true; | ||
if ($permissions->connect === true) $connect = true; | ||
if ($permissions->speak === true) $speak = true; | ||
if ($permissions->mute_members === true) $mute_members = true; | ||
if ($permissions->deafen_members === true) $deafen_members = true; | ||
if ($permissions->move_members === true) $move_members = true; | ||
if ($permissions->use_vad === true) $use_vad = true; | ||
if ($permissions->add_reactions === true) $add_reactions = true; | ||
if ($permissions->send_messages === true) $send_messages = true; | ||
if ($permissions->send_tts_messages === true) $send_tts_messages = true; | ||
if ($permissions->manage_messages === true) $manage_messages = true; | ||
if ($permissions->embed_links === true) $embed_links = true; | ||
if ($permissions->attach_files === true) $attach_files = true; | ||
if ($permissions->read_message_history === true) $read_message_history = true; | ||
if ($permissions->mention_everyone === true) $mention_everyone = true; | ||
if ($permissions->use_external_emojis === true) $use_external_emojis = true; | ||
if ($permissions->kick_members === true) $kick_members = true; | ||
if ($permissions->ban_members === true) $ban_members = true; | ||
if ($permissions->administrator === true) $administrator = true; | ||
if ($permissions->manage_guild === true) $manage_guild = true; | ||
if ($permissions->view_audit_log === true) $view_audit_log = true; | ||
if ($permissions->view_guild_insights === true) $view_guild_insights = true; | ||
if ($permissions->change_nickname === true) $change_nickname = true; | ||
if ($permissions->manage_nicknames === true) $manage_nicknames = true; | ||
if ($permissions->manage_emojis === true) $manage_emojis = true; | ||
*/ | ||
} | ||
//echo "kick_members: " . $user_perms['kick_members'] . PHP_EOL; | ||
//var_dump($user_perms); | ||
//var_dump($author_member->getPermissions()); | ||
|
||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
$blacklisted_guilds[] = "581914082471444511"; | ||
$blacklisted_guilds[] = "697833083201650689"; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
$blacklisted_owners[] = "314864403004784641"; | ||
$blacklisted_owners[] = "268163123322552321"; | ||
$blacklisted_owners[] = "218798013630513152"; | ||
$blacklisted_owners[] = "303573625674399754"; | ||
$blacklisted_owners[] = "149195023265562624"; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
s:1:";"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"require": { | ||
"team-reflex/discord-php": "dev-master", | ||
"restcord/restcord": "^0.4.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
//guild_config.php needs to be located in a folder that shares the guild ID | ||
//The folder will be automatically created after the bot sees a message being sent in the server for the first time, but you can create it yourself | ||
//Make a copy of guild_config_template.php and place it in the folder | ||
//**ALL** field in guild_config.php **MUST** be filled out unless otherwise noted or the bot will probably experience crashes | ||
|
||
//This config file includes options that are enabled/disabled with chat commands | ||
//Any changes made to this file will require a full restart of the bot before they take place | ||
|
||
//Variables in this file are initialized at the global scope when the bot is started | ||
//Variables need to be reinitialized within the event listener by using the GLOBAL keyword (e.g. GLOBAL $bot_id;) | ||
|
||
$server_invite = "https://discord.com/oauth2/authorize?client_id=662093882795753482&scope=bot&permissions=8"; //Invite link to add this bot to the server | ||
$bot_id = "662093882795753482"; //id of this bot (change it to match your bot if not using Palace Bo#9203) | ||
|
||
//These are default options that should be set up before the bot is started for the first time. Any future changes need to be done with a chat command | ||
$react_option = true; | ||
$vanity_option = false; | ||
$nsfw_option = false; | ||
$games_option = false; | ||
$rolepicker_option = false; | ||
$species_option = false; | ||
$sexuality_option = false; | ||
$gender_option = false; | ||
$custom_option = false; //Edit custom_roles.php before changing this to true! | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
$BASE_DIR = __DIR__ . "/../"; | ||
$DIR = __DIR__ . "\\"; | ||
$now = new DateTime(); | ||
?> |
Oops, something went wrong.