Skip to content

Commit

Permalink
Added Streamers and Viewers role to Game Roles; Member Update Fix; Ne…
Browse files Browse the repository at this point in the history
…w Custom Roles default template

Palace Bot does not use the Twitch API to determine if someone goes live and currently does not capture any related info from Discord, so if you want that type of feature you should add another bot such as YAGPDB.xyz, which could use the Streamers role to determine whose streams to announce and the message could be broadcasted to a channel only Viewers have access to.

GUILD_MEMBER_UPDATE has been altered to not spam the logs every time it 'sees' a new member for the first time if they already exist in a guild but loadAllMembers wasn't enabled when the bot was launched, thus thinking a new nickname or a bunch of roles were being added to someone.

Added a more relevant Custom Roles default. The old one was meant for the Civ13 server whom requested it originally.
  • Loading branch information
valzargaming committed Nov 29, 2021
1 parent 755e333 commit e421f5a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
10 changes: 3 additions & 7 deletions custom_roles.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
<?php
$customroles = array(
"Persistence" => "♾️",
"Nomads" => "🛠️",
"TDM" => "🔫"
"Self-Promo" => "📰",
);

//Message copy-pasta:
$customroles_message_text = "**Role Menu: Ping Tags**
:infinity: : `Persistence`
:tools: : `Nomads`
:gun: : `TDM`
$customroles_message_text = "**Role Menu: Custom Tags**
:newspaper: : `Self-Promo`
";
3 changes: 2 additions & 1 deletion functions/guildmemberupdate-function.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
function guildMemberUpdate($member, $discord, $member_old) {
if (is_null($member)) return; //either the loadAllMembers option or the privileged GUILD_MEMBERS intent may be missing
if (is_null($member)) return; //the privileged GUILD_MEMBERS intent may be missing
if (is_null($member_old)) return; //either the loadAllMembers option or the privileged GUILD_MEMBERS intent may be missing
if ($member->id === $discord->id) return; //Don't process changes for the bot (not compatible with $diff)
include_once "custom_functions.php";
$author_guild = $member->guild;
Expand Down
5 changes: 5 additions & 0 deletions game_roles.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?php
$gameroles = array(
"LFG" => "🔍",
"Streamers" => "🛰️",
"Viewers" => "📡",

"7 Days To Die" => "🧟",
"Call of Duty" => "🪖",
"Crusaders of the Lost Idols" => "⚔️",
Expand All @@ -18,6 +21,8 @@
//Message copy-pasta:
$gameroles_message_text = "**Role Menu: Games**
:mag: : `Looking For Group`
:satellite_orbital: : `Streamers`
:satellite: : `Viewers`
:zombie: : `7 Days To Die`
:military_helmet: : `Call of Duty`
Expand Down

0 comments on commit e421f5a

Please sign in to comment.