0
0
Fork 0
mirror of https://github.com/Sanae6/SmoOnlineServer.git synced 2024-11-24 04:05:17 +00:00

Add README.md

This commit is contained in:
Sanae 2022-06-17 21:18:57 -06:00
parent 1f5ea97272
commit dd3f65f5e8
3 changed files with 34 additions and 2 deletions

30
README.md Normal file
View file

@ -0,0 +1,30 @@
# Super Mario Odyssey: Online Server
The official server for the [Super Mario Odyssey: Online](https://github.com/CraftyBoss/SuperMarioOdysseyOnline) mod.
## Windows Setup
1. Download latest build from [Releases](https://github.com/Sanae6/SmoOnlineServer/releases)
2. Run `SMO.Server.exe`
3. `settings.json` is autogenerated in step 2, modify it however you'd like.
## Building (Mac/Linux Setup)
Must have the [.NET 6 SDK](https://dotnet.microsoft.com/en-us/download) and Git installed.
Run these commands in your shell:
```shell
git clone https://github.com/Sanae6/SmoOnlineServer
cd SmoOnlineServer
# replace run with build to only build the server
dotnet run --project Server/Server.csproj -c Release
```
If you ran `dotnet build` instead of `dotnet run`, you can find the binary at `Server/bin/net6.0/Release/Server.exe`
## Commands
Run `help` to get what commands are available in the server console.
Run the `loadsettings` command in the console to update the settings without restarting.
Server address and port will require a server restart, but everything else should update when you run `loadsettings`.
[//]: # (TODO: Document all commands, possibly rename them too.)

View file

@ -40,6 +40,7 @@ public class DiscordBot {
$"Console log:```{Logger.PrefixNewLines(text, $"{level} [{source}]")}```");
}
} catch (Exception e) {
// don't log again, it'll just stack overflow the server!
await Console.Error.WriteLineAsync("Exception in discord logger");
await Console.Error.WriteLineAsync(e.ToString());
}
@ -63,8 +64,6 @@ public class DiscordBot {
string mentionPrefix = $"{DiscordClient.CurrentUser.Mention} ";
DiscordClient.MessageCreated += async (_, args) => {
DiscordMessage msg = args.Message;
Console.WriteLine(
$"{msg.Content} {DiscordClient.CurrentUser.Mention} {msg.Content.StartsWith(mentionPrefix)}");
if (msg.Content.StartsWith(Prefix)) {
await msg.Channel.TriggerTypingAsync();
await msg.RespondAsync(string.Join('\n',

View file

@ -7,6 +7,9 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared", "Shared\Shared.csproj", "{CE222C1F-FBCE-4690-BD14-B7D6290A473E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "External Items", "External Items", "{38C80331-521C-4097-8652-4DF384E5B9C1}"
ProjectSection(SolutionItems) = preProject
README.md = README.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution