Created 6 years ago2018-06-02 04:57:09 UTC by Penguinboy
http://
or https://
otherwise I just get the ISP search page saying the site couldn't be found (in my case, Verizon Fios). Also using Firefox, if that makes a difference.You could also end up with one (or more) maps loitering on the front page with regular updates.To be fair, wouldn't this be one of the main purposes of the front page updates? Otherwise people would have to upload separate versions of maps in response to [constructive] criticism.
http://
).www
which should hopefully fix it.Ctrl+F5
.<?php
// Step 0: Install RestCord (Composer: restcord/restcord)
// Step 1: Go to https://discordapp.com/developers/applications/ and register a new application
// Step 2: Create a bot for that application
// Step 3: Go to https://discordapp.com/oauth2/authorize?&client_id=502232355797204994&scope=bot&permissions=66560 (replace 502232355797204994 with your application's client id) and make the bot join the relevant server
// Step 4: Update the definitions below
define("BOT_TOKEN", "NTAyMjMyMzU1Nzk3MjA0OTk0.DqlD6w.uOnSIKcM7N0oG6srQN8vUBqsM3Q");
define("DISCORD_SERVER_ID", 502229064434712585);
define("CHANNEL_ID", null); // <- Define for one request fewer (since we don't have too look up the ID from the name)
define("CHANNEL_NAME", "general");
define("CHANNEL_TYPE", 0); // 0 for text channel (see https://discordapp.com/developers/docs/resources/channel#channel-object-channel-types)
require_once __DIR__ . "/vendor/autoload.php";
use RestCord\DiscordClient;
use Psr\Log\LoggerInterface;
class SilentLoggerReplaceWithSomethingBetterOrUseTheDefaultLogger implements LoggerInterface {
public function emergency($message, array $context = array()) {}
public function alert($message, array $context = array()) {}
public function critical($message, array $context = array()) {}
public function error($message, array $context = array()) {}
public function warning($message, array $context = array()) {}
public function notice($message, array $context = array()) {}
public function info($message, array $context = array()) {}
public function debug($message, array $context = array()) {}
public function log($level, $message, array $context = array()) {}
};
$discordClient = new DiscordClient(["token" => BOT_TOKEN, "logger" => new SilentLoggerReplaceWithSomethingBetterOrUseTheDefaultLogger()]);
$channelId = CHANNEL_ID;
if($channelId === null) {
$guildChannels = $discordClient->guild->getGuildChannels(["guild.id" => DISCORD_SERVER_ID]);
foreach($guildChannels as $channel) {
if($channel->name === CHANNEL_NAME && $channel->type === CHANNEL_TYPE) {
$channelId = $channel->id;
break;
}
}
if($channelId === null) {
exit("Channel not found.\n");
}
}
echo "Channel ID: " . $channelId . "\n";
$messages = $discordClient->channel->getChannelMessages(["channel.id" => $channelId, "limit" => 5]);
echo "Messages:\n";
foreach($messages as $msg) {
$time = new DateTime($msg["timestamp"], new DateTimeZone("UTC"));
$author = $msg["author"]["username"];
$content = $msg["content"];
echo $time->format("Y-m-d H:i:s") . " " . $author . " wrote:\n" . $content . "\n\n\n";
}
?>
I'd offer to help with this beyond just this example code if you're interested in implementing this, but, you know, I'm lazy.I was going to say maybe a map update should only show on the front page if the upload changes, but what would that do for externally hosted maps, and sorting in the map vault? Where does the "update" line get drawn, and how can it always be enforced?I came here to say basically the same thing but since you guys are ok with it, no problem then. I'm just not particularly proud of some of my works and only intended to update the links for Jessie
but it might be a good idea to add a game selector when you post a competition entry too so it's easier to spot.I strongly second that, I had to guess which game one of the entries was for.