Plain C implementation of Discord API (shitcode. look for libdiscord)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Alexander Memer a6edb75bc8 Implemented INVALIDATE_SESSION opcode 11 months ago
cmake Switched to CMake 11 months ago
deps Fixed crashes and random segfaults(?) 11 months ago
include/crow Implemented reconnecting 11 months ago
src Implemented INVALIDATE_SESSION opcode 11 months ago
tests Implemented reconnecting 11 months ago
.gitignore Switched to CMake 11 months ago
.gitmodules New rest api and logging (easier for me to debug and looks nice) 1 year ago
CMakeLists.txt Switched to CMake 11 months ago
COPYING Add COPYING file 2 years ago
README.md Switched to CMake 11 months ago

README.md

Crow

Discord API library written in C.

Tested on Fedora.

This software is under heavy development and very unstable so I don’t recommend to use it.

Used libraries (thanks <3)

Implemented

  • Channel
    • Get Channel
    • Modify Channel
    • Delete/Close Channel
    • Get Channel Messages
    • Get Channel Message
    • Create Message
    • Create Reaction
    • Delete Own Reaction
    • Delete User Reaction
    • Get Reactions
    • Delete All Reactions
    • Edit Message
    • Delete Message
    • Bulk Delete Messages
    • Edit Channel Permissions
    • Get Channel Invites
    • Create Channel Invite
    • Delete Channel Permission
    • Trigger Typing Indicator
    • Get Pinned Messages
    • Add Pinned Channel Message
    • Delete Pinned Channel Message
    • Group DM Add Recipient
    • Group DM Remove Recipient
  • Guild (nothing implemented yet)
  • Invite (nothing implemented yet)
  • User (nothing implemented yet)
  • Voice (nothing implemented yet)
  • Webhook (nothing implemented yet and not planned)

Installation

NOTE: This guide is outdated.

This is an example for installation on debian-based linux distributions.

First you need a build essentials. Install it with apt.

apt-get install build-essentials # gcc, make etc...

Then you’ll need some libraries:

apt-get install libjson-c-dev # JSON library

apt-get install libcurl4-openssl-dev # CURL with SSL support

After library installation clone this repository with submodules:

git clone --recursive https://github.com/TrueMemer/Crow.git

cd Crow

Execute the following commands:

make

To run bot execute ./crow.

Usage

You can create file .crowrc in your home directory with following syntax:

bot_prefix=!!
token=MjIzMDQyOTM0NjA0MzAwMjg5.DGyFPA.QUJzunfPjC2ajfnj9qSyocsNFAW

Just replace token and bot_prefix with yours.

You can also provide token via argument like this:

./crow --token=MjIzMDQyOTM0NjA0MzAwMjg5.DGyFPA.QUJzunfPjC2ajfnj9qSyocsNFAW

But you can’t provide bot prefix this way. There is also flag -s which saves current token and bot prefix to your .crowrc file. Default prefix is ??.