Giter VIP home page Giter VIP logo

sknibot's Introduction

Bocik

Discord bot developed by the SKNI (Studenckie Koło Naukowe Informatyków "KOD") members. It contains a lot of various commands which includes: random cats, dogs, animu, xkcd comics, SpaceX launches, 8Ball, wiki articles, hangman, Monty Python, lizards, compiler, statistics, chess, moderation commands and more.

Compilation

Before compilation you need to create necessary JSON files. Nake new JSONs "release.json" and "debug.json" using "settings.json.example" as template. Put in these JSONs api token of your bot. There are two JSONs. One for test pruposes and one for publishig bot. Second JSON file you need to create is "developers.json" using "developers.json.example". You should put here yours and yours contributors Discord ID as array of strings. Make sure you also checked "Copy to Output Directory" in both JSON's properties.

Used libraries

sknibot's People

Contributors

amy-di-aricci avatar azuxdario avatar caedo avatar matif100 avatar saimon833 avatar suzurri avatar szatex avatar tearth avatar wojciechlu avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

fubar1337 smok7kp

sknibot's Issues

Add SimpleResponse Service

Add service for commands that are based on Commands and SimpleResponse.
Also change joke command as example of usage.

Refactoring of CatBoy command

CatBoy command should use SimpleResponseService like żart command does.
Since CatBoy uses only image answers you can omit other types of response for now.
Message should be posted by PostEmbedHelper.PostEmbed.

Refactoring of MontyPython command

MontyPython command should use SimpleResponseService like żart command does.
Since MontyPython uses only YouTube answers you can omit other types of response for now.

Add posibility to get api keys from environment variables

Bot should be able to get api keys from environment variables.
If variable SKNIBotUseEnv is set to "true", bot will be using variables instead of settings json files. Variables should be made for debug mode also. If one of variable isn't present bot should exit with error.
List of variables:

  • SKNIBotUseEnv
  • SKNIBotDiscordToken
  • SKNIBotDiscordPrefix
  • SKNIBotClubServer
  • SKNIBotWaaaiApiKey
  • SKNIBotJDoodleClientId
  • SKNIBotJDoodleClientSecret
  • SKNIBotSpotifyClientId
  • SKNIBotSpotifyClientSecret

Also remove ClubChannelForWelcomeMessage since it's deprecated.

Fix awatar command

Awatar has bug and doesn't display picture. It's caused by PostEmbed() method and its workaround for japanese characters.

Refactoring

Refactoring of database models and some commands.

Refactoring of statistics commands

Commands: "stats", "statsall", "msgstats" and "msgstatsall" in their current form are terribly implemented, which causes long work duration and memory usage issues. They should be rewritten to support a large number of messages present on the server.

Add welcome message feature.

Commands:

  • setWelcomeMessage
  • removeWelcomeMessage
  • showWelcomeMessage
  • changeWelcomeMessageChannel
  • changeWelcomeMessageContent

Database:

  • new table

Service:

  • post welcome messages

Fix online command

Problem related to new intents. We need to add proper usage of intent.

Add mute command

Add command to mute specific interactions of bot, like word-triggered messages or time based events

Add user info command

Command should return information about user who calls it or about mentioned user.

Definition of function
public async Task SendUserInfo(CommandContext ctx, DiscordMember member = null)

If member == null send info about user who triggers command otherwise send info about user who is mentioned.

Informations to return:

  • Username with discriminatior
  • User id
  • Date of creation account
  • Date of join to server
  • Roles

Fix of auto-responses

Auto-responses have stopped working after the recent DSharpPlus update, due to a change of delegate signatures.

XD response loops

Boot reacts to its own XD by sending next XD, that it makes message loop.

Refactoring of 8Ball command

8Ball command should use SimpleResponseService like żart command does.
Since 8Ball uses only text answers you can omit other types of response for now.
Message should be posted by PostEmbedHelper.PostEmbed.

Some fun

we will see what i come up with

Change way of logging messages

Replace all Console.WriteLine() occurences with appropriate Bot.DiscordClient.Logger.LogXYZ() functions. If you not sure how logger messages should look like you can consult me.
If there are multiple lines they should be reduced to one line.

eq. from

Console.WriteLine("Error: Counting emoji in new message.");
Console.WriteLine("Message: " + message?.Content);
Console.WriteLine("Channel: " + message?.Channel);
Console.WriteLine("Exception: " + ie.Message);
Console.WriteLine("Inner Exception: " + ie?.InnerException?.Message);
Console.WriteLine("Stack trace: " + ie.StackTrace);

to

Bot.DiscordClient.Logger.LogError("Error during counting emojis in new message with exception: ie.Message");

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.