Skip to content

Instantly share code, notes, and snippets.

View moiph's full-sized avatar

moiph moiph

  • Seattle
View GitHub Profile
@moiph
moiph / BestCodeEver.cs
Created July 14, 2019 00:37
It's a Discord.net gist...from Enspiron!
[ Command ( "Warn" )]
0 references
-
public async Task warn (SocketGuildUser User, [Remainder]string Message = "")
{
FileHandler fileHandler = new FileHandler();
fileHandler.AddToList(Context.Guild.Id + "/" + User.Id + ".txt", Message);
await Context.Message.Channel.SendMessageAsync( "warn");
}
@moiph
moiph / status.aspx
Last active February 11, 2016 12:11 — forked from dkesberg/status.php
Server status / online players page for Starbound. Parses the log file to grab data. Naturally this won't scale with an ever increasing log file, but does the job for now! Hopefully Starbound will add server APIs to get the data in a more efficient manner :)
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Linq" %>
<%@ Import Namespace="System.Web" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.Net.Sockets" %>
<script runat="server">
//// This is a replica of https://gist.github.com/dkesberg/7926899, but built for asp.net instead of PHP.