Tars.ScheduledEvents

A simple framework to facilitate the construction of bots for Discord using C#, make with DSharpPlus library. This specific library brings the compatibility of Tars with the scheduled events that are executed every time interval.


Keywords
DSharpPlus, Discord, DiscordBot, Tars, bot, events, scheduled, csharp, csharp-library, discord-bot, dotnet, dotnet-standard, dotnetstandard, dotnetstandard-2-0, dotnetstandart20, dsharp, dsharplus, net, netstandard, netstandard-libraries, netstandard2, netstandard20, netstandart
License
MIT
Install
Install-Package Tars.ScheduledEvents -Version 1.1.3

Documentation

Discord

A simple library to facilitate the construction of bots for Discord using the C# language, DSharpPlus library and .NET Standard 2.0.

Installing

  • Install the library through NuGet, if you only wanted the basics to start the bot, download only the "Tars" package.

Getting Started

  • Create a project in Visual Studio, preferably in .NET Core, version 2.0 or later.
  • Change the Main method from void to async Task.
  • If red lines appear in the code, click on it and press Ctrl + . and add the missing usings, do it the other times you need.
  • In your bot's main, just write this:
static async Task Main(string[] args)
{
    var botBase = new TarsBase(Assembly.GetEntryAssembly());
    botBase.DiscordSetup("Your bot's token");
    botBase.CommandsSetup(new string[] { "A prefix of your choice" });

    await botBase.StartAsync();
}
  • If you start the bot by another class and methods that are not static, you can put the bot class as a service, to access it via commands, this is how it is added:
botBase.CommandsSetup(new string[] { "A prefix of your choice" }, services: new ServiceCollection().AddSingleton(this));
  • And ready! If everything goes as expected, your bot will go online :)

  • This tutorial is just the basics to create a bot, to see more Tars functions, click here.

Doubts? Questions?

  • Open an issue or enter our Discord:

    Tars Chat

Credits