Giter Site home page Giter Site logo

dbm-firebase's Introduction

Discord Bot Maker Firebase

Use the Firebase database on DBM easily and completely.

Table of contents

Getting started

We will first start by doing what is necessary.

1. We need to login in Firebase website with a Google account. Visit the Firebase website.
2. Click on top right button called "Go to console" to go to console of Firebase.


3. Create a new project and do what is needed.

4. Create a new web app and do what ask.

Note: you do not need to click this option, it is optional:

All done so far. Let's continue.

Configuring DBM bot

Now we will prepare your bot to start using the service. Look carefully.

1. Download the latest release of Firebase integration mods clicking here (note: DBM Mods must be installed first).
2. With the .zip file downloaded, extract it and open the first folder.

Looking at the folders, there will be the folder "actions" and "data", in actions are DBM mods integrated with Firebase, and in data is where we should configure our database in our bot, there will have the file fbConfig.json.

Installing actions folder

1. Open your Steam Library and open the Softwares tab.
2. Choose Discord Bot Maker β†’ Local Files β†’ Browse Local Files
3. Now copy the folder actions you downloaded out of the zip file into that folder you just opened (please overwrite existing ones).

Note: If you don't run your bot with DBM make sure to copy this actions to your bot's directory too! Same for hosted bots! If you don't do this, missing actions will appear as "XYZ is not an Action" in your console.

Installing and setting data folder

1. Copy the data folder to your DBM bot main directory (replace existing files).
2. In the folder of your bot, now go to the data folder and open the file fbConfig.json, in it you will see something like this:

{
  "apiKey": "X",
  "authDomain": "X",
  "databaseURL": "X",
  "projectId": "X",
  "storageBucket": "X",
  "messagingSenderId": "X",
  "appId": "X"
}

You must replace each X for such a thing as you are saying and then just save.

Where find the X values of my Firebase project?

1. Access your chosen Firebase project.
2. Go to where your project settings are.

3. Scroll down and you will see the apps of your project (create one if you don't have one), go to where is "Firebase SDK snippet" and select the "Config" option and copy the value of each field of that and paste it into your fbConfig.json.

Creating database

1. In the main part of your Firebase project, select from the "Database" side menu.

2. On the page you will have two database options, I recommend Realtime (the below), both have slight differences, but Realtime is already great. Click on Create Database.

3. Choose whether the DB will be private to write something to and read to certain people or if it will be open to everyone, use open mode (test mode), since if you have a command that uses database, the user will have to be able to register their datas.

All finished

Now your Firebase database is registered and you can now use the control, check, store and delete mods to control servers, members, and globally your DB in your DBM bot!

You can use the following mods:

  • Control Firebase Server Data
  • Control Firebase Member Data
  • Control Firebase Global Data
  • Check Firebase Server Data
  • Check Firebase Member Data
  • Check Firebase Global Data
  • Store Firebase Server Data
  • Store Firebase Member Data
  • Store Firebase Global Data
  • Delete Firebase Server Data
  • Delete Firebase Member Data
  • Delete Firebase Global Data
  • Store Firebase Member Data List

Issues

If you want to make a suggestion or report a possible bug, open an issue.

dbm-firebase's People

Contributors

cappp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dbm-firebase's Issues

I tried it with the New Release, its still not working but showing an error. [BUG]

Hey, I really apreciate that you tried to fix the bug so fast! But it still doesnt work...
I get this Error-Code:

Bot is ready!
(node:16692) UnhandledPromiseRejectionWarning: TypeError: this.getMods is not a function
    at Object.action [as Control Firebase Global Data] (C:\Users\Finn\Desktop\DX_Sheet\actions\control_firebase_global_data_MOD.js:49:27)
    at Object.Actions.invokeActions (C:\Users\Finn\Desktop\DX_Sheet\bot.js:498:18)
    at Object.Actions.preformActions (C:\Users\Finn\Desktop\DX_Sheet\bot.js:387:8)
    at Object.Bot.checkCommand (C:\Users\Finn\Desktop\DX_Sheet\bot.js:178:12)
    at Object.Bot.onMessage (C:\Users\Finn\Desktop\DX_Sheet\bot.js:161:13)
    at Client.emit (events.js:311:20)
    at MessageCreateAction.handle (C:\Users\Finn\Desktop\DX_Sheet\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (C:\Users\Finn\Desktop\DX_Sheet\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (C:\Users\Finn\Desktop\DX_Sheet\node_modules\discord.js\src\client\websocket\WebSocketManager.js:386:31)
    at WebSocketShard.onPacket (C:\Users\Finn\Desktop\DX_Sheet\node_modules\discord.js\src\client\websocket\WebSocketShard.js:436:22)
(node:16692) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:16692) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. 

I hope you can get something usefull out of that.

Regards Finn

sheeterror

New Feature?: Save Variable

Well i think there is something forgotten and it's Save Variable as i can't save any Variable such old command or something like this so if it possible to create this script to be uploaded into firebase database?
Screenshot_2
Screenshot_3
Screenshot_4

Can't Store Multiple Data Values

Hey, I recently had an issue trying to send / receive data using this mod, I managed to fix that, however, everytime you store more than one value, one will show up as undefined.

SUGGESTION: List Feature

If possible, could there be a feature using lists instead of Member, Server or Global Data? Example below:

Control Firebase List
Item Action
Add Item
Remove Item

Store Firebase List
List Name Enter Name
Store In
Temp Variable
Server Variable
Global Variable

Store Firebase Member Data don't store values ​​= 0

The Store Firebase Member Data action doesn't store values ​​equal to 0. If the Data value is = 0, it simply does not store the value and doesn't advance to the next action. Could you have a look please? I noticed this only on Store Firebase Member Data. In other actions I didn't notice this problem.

Mod not working

I followed all the instructions and then proceeded to test the Mod. When I type my testing command which should write something into firebase, nothing happens... no console error ( only once ) no write in firebase

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.