DiscordBot w/ DB Integration

08/10/2019 23:40 AceSpace#1
Hello,

I was bored and so I made this bot, I will explain how it works and how you can use it to the fullest.

If you don't know how to setup/make a discord bot, follow this:



What is this discord bot capable of doing?
  • Absolute control via database
  • Very similar to the infamous BOT System
  • Various events etc
  • Complete log of the discord chat
  • Assign role for new members (by role name)

What can you do via the database?
  1. Send Message
  2. Delete Messages
  3. React to Messages
  4. Direct Message Users
  5. Trigger certain events on (Mention, Message, DM) etc

What is this bot useful for?
  • Creating custom event without allowing someone else to have access to the db
  • Unique Log / Appeared or Killed
  • Global Log
  • Job Kill Log or Wanted Log
  • etc

Usage example:

Examples

Important information:
  • You can use _AddMessageLog / _AddMentionLog to do any kind of event depending on the event (think of it as log db procedures)
  • You can get ChannelId from _ChannelData or _MessageLog or right clicking on the channel in Discord and pressing Copy ID
  • You can mention a user using the following code (You can obtain UserId from _MessageLog)
    Code:
    '<@' + @UserId + '>
  • Procedures parameters:

    _AddMessageLog
    @Channel
    @ChannelId
    @User
    @UserId
    @Message
    @MessageId

    _AddMentionLog
    @Channel
    @ChannelId
    @User
    @UserId
    @Message

    _AddDMLog
    @User
    @UserId
    @Message
    @MessageId

    _DeleteMessage
    @ChannelId
    @MessageId

    _ReactMessage
    @ChannelId
    @MessageId
    @EmojiId

    _SendMessage
    @ChannelId
    @Content

    _SendDM
    @UserId
    @Message

  • You can get the EmojiId by right clicking on the emoji and pressing Copy ID
  • You can send an emoji by using the follow the normal emoji name ex:
    Code:
    :thinking:
    
    EXEC _SendMessage ChannelId, 'What? :thinking:'
  • Edit config.json and put your database info and discord bot token


Hopefully someone will be able to use it.
08/10/2019 23:44 XxGhostSpiriTxX#2
good, Thanks bro for shared
08/11/2019 00:08 ILowe#3
db restore error :(

PHP Code:
System.Data.SqlClient.SqlErrorThe database was backed up on a server running version 13.00.5026That version is incompatible with this serverwhich is running version 12.00.2000Either restore the database on a server that supports the backup, or use a backup that is compatible with this server. (Microsoft.SqlServer.SmoExtended
have script?
08/11/2019 00:26 XxGhostSpiriTxX#4
Quote:
Originally Posted by ILowe View Post
db restore error :(

PHP Code:
System.Data.SqlClient.SqlErrorThe database was backed up on a server running version 13.00.5026That version is incompatible with this serverwhich is running version 12.00.2000Either restore the database on a server that supports the backup, or use a backup that is compatible with this server. (Microsoft.SqlServer.SmoExtended
have script?
use a newer sql version
08/11/2019 03:29 VORTEX*#5
so useful , thanks
08/11/2019 04:37 Disaster.#6
Good Job Bro
08/11/2019 10:31 AceSpace#7
Quote:
Originally Posted by ILowe View Post
db restore error :(

PHP Code:
System.Data.SqlClient.SqlErrorThe database was backed up on a server running version 13.00.5026That version is incompatible with this serverwhich is running version 12.00.2000Either restore the database on a server that supports the backup, or use a backup that is compatible with this server. (Microsoft.SqlServer.SmoExtended
have script?
I have added the db script in the attachments.
08/11/2019 11:03 m1xawy#8
thanks ,
08/11/2019 13:31 Foberious#9
thanks
08/11/2019 21:34 ScarOnline#10
awesome bot thanks for sharing
08/12/2019 05:31 notHype*#11
Great job, Ace! Can't wait to see this used in Ruby 4! #waiting.
08/12/2019 06:13 ILowe#12
Can you tell me about the installation?
Can you tell with video. I don't understand how it works :(
08/12/2019 08:25 AceSpace#13
Quote:
Originally Posted by ILowe View Post
Can you tell me about the installation?
Can you tell with video. I don't understand how it works :(
Check the first post, I have added a small guide on how to do it.
08/12/2019 12:28 Disaster.#14
Anyone test it and Work fine
08/12/2019 16:31 XxGhostSpiriTxX#15
error

[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]