This commit is contained in:
2022-05-20 09:57:35 +03:00
parent c719eaf4fd
commit 9f656d5f3f
24 changed files with 70 additions and 1502 deletions

23
FreeGames/Free.cs Normal file
View File

@@ -0,0 +1,23 @@
using PluginManager.Interfaces;
using Games.Objects;
namespace Games;
public class Free : DBCommand
{
public string Command => "game";
public string Description => "Display info about the specified game";
public string Usage => "game <game>";
public bool canUseDM => false;
public bool canUseServer => true;
public bool requireAdmin => false;
public async void Execute(Discord.Commands.SocketCommandContext context, Discord.WebSocket.SocketMessage message,
Discord.WebSocket.DiscordSocketClient client, bool isDM)
{
string game_name = PluginManager.Others.Functions.MergeStrings(message.Content.Split(' '), 1);
string game_url = await GameData.GetSteamLinkFromGame(game_name);
await context.Channel.SendMessageAsync(game_url);
}
}