-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
47bca31
commit 82a3c22
Showing
1 changed file
with
40 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,40 @@ | ||
<?php | ||
include('inc/discord.php'); | ||
/** | ||
* ez-discordwidget (MIT) | ||
* By Lunaversity | ||
* https://github.com/Lunaversitay/ez-discordwidget/ | ||
*/ | ||
|
||
// here's some examples | ||
|
||
# Echo the server name | ||
|
||
echo $discord_name; | ||
|
||
# Echo each channel | ||
|
||
foreach( $discord_channels as $dis_channel => $dischans ){ | ||
echo "Channel: ".$dischans['name']."<br>"; #Echos the channels | ||
} | ||
|
||
# Echo each member (seems to only echo online members) | ||
|
||
foreach( $discord_users as $dis_users => $disuser ){ | ||
echo "<h1> Username: ".$disuser['username']."</h1>"; #Discord username they signed up with | ||
echo "<h1> Nick: ".$disuser['nick']."</h1>"; #Their server nickname | ||
echo "<h2> Status: ".$disuser['status']."</h2>"; #Their status, idle, busy, online | ||
echo "<img src=" .$disuser['avatar_url']. "><br><hr>"; #Avatar | ||
} | ||
|
||
/* | ||
There are others such as: | ||
channel_id (userside) | ||
suppress (userside) | ||
mute (userside) | ||
self_mute (userside) | ||
self_deafen (userside) | ||
you can find them all when you grab your widget ID. | ||
*/ | ||
?> |