Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2017-04-25 14:49:16, last edited by Processor (2017-04-25 14:50:36)

Processor
Member
Joined: 2015-02-15
Posts: 2,246

[Release] BotCake

BotCake is a BotBits extension that removes the need to maintain a reference to BotBitsClient across your application.

With BotCake, you put your code in BotBase classes. BotBase classes automatically load EventListeners / Commands and no longer require .Of(bot) to access BotBits APIs.

class MyBot : BotBase
{
    HelloWorld helloWorld = new HelloWorld();
}
class HelloWorld : BotBase
{
    [EventListener]
    void On(JoinCompleteEvent e) 
    {
        Chat.Say("hello world!");
    }
}

Put your configuration in a separate file and never think about it again.

Program.cs

class Program
{
    static void Main()
    {
        CakeSetup.WithBot(bot => new MyBot())     // Set MyBot as your main class
            .WithEmail("email", "pass")           // Login
            .CreateJoinRoom("roomId");            // Join a room
    }
}

Getting started


I have never thought of programming for reputation and honor. What I have in my heart must come out. That is the reason why I code.

Offline

Wooted by: (4)
Processor1493128156656641

Board footer

Powered by FluxBB

[ Started around 1734492293.604 - Generated in 0.018 seconds, 10 queries executed - Memory usage: 1.36 MiB (Peak: 1.44 MiB) ]