Coder Social home page Coder Social logo

jcarmona4254 / discord2sheet-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hugonun/discord2sheet-bot

0.0 0.0 0.0 20 KB

Discord bot that stores messages to Google Sheet.

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

discord2sheet-bot's Introduction

discord2sheet-bot

This bot allows users to submit messages directly to your Google Sheet.

Example:

!s Hello world, How are you today?

Output:

Username - UserID - Date - Field 1 - Field 2

Google Sheet

How to set it up

Step 1: Enable the API and download credentials.json. This can be done here: https://developers.google.com/sheets/api/quickstart/python#step_1_turn_on_the

Make sure credentials.json is stored in the same directory as the bot.

Step 2: Open init.py and change the following values(<>):

SPREADSHEET_ID = <> - The ID of the spreashsheet to store the data. It can be found on the URL once opened.

FIELDS = <> - Amount of fields/cells that get stored. They are on the user's message seperated by comma (!s field1, field2,field 3)

client.run('<>') - The token of the Discord bot.

Step 3: Install Python dependencies

If you haven't installed Python yet, download it here.

Install discordpy: pip install discord.py

Run the pip command listed here: https://developers.google.com/sheets/api/quickstart/python#step_2_install_the_google_client_library

Step 4: Run the bot

python init.py


Additional configutations

REQUIREDROLE = <> - If you want to restrict the command to a specific role, insert here the role id. If not, insert None.

RANGE_NAME = <> - Where the data should go in the spreadsheet. Default value is A1.

DATA = <> - What data goes to the rows, seperated by []. Example: DATA = [result[0]] + [''] + [result[1]]

discord2sheet-bot's People

Contributors

hugonun avatar

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.