Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Some information about bot setup and how it works.
#Bot Setup
#guide for those who want to fork some of the bot's command.
Please use my code for a learning guide, do not copy commands.
When you see os.environ["tenor_key"]
Env is loaded by default on services that see the .env file as a secret file, however you can just load it with python-dotenv or replace the text with a string
you get a key from the tenor api key from
a giphy key like os.environ["giphy_key"]
make a key on
(I will not provide you with my api keys, do not ask me about them, if you need help adding them properly you may ask, but I will not provide you mine or make one for you, do not ask me to make you an api key for you.)
os.environ["image_api_key"] uses
os.environ["google_image_key"] use:
make a key on
some settings:
Name this something you want, prefarbly without profanity.
I censored my own codes, because I do not want you use to my custom search, copy to clipboard for the code(this is highlighted)
turn image search on, it's nice. Turn on Safe Search. Language English, unless you use a different language for your bot.
You do not need to search a specific site, just don't instead search the internet like how google does.
There you go.
bot.session or client.session is for a bot subclass, ask or your local fork what this means.
But basically we are adding a custom session to the class.
I would urge you to ask for an example in (yes the main server or the one right now)
class MyBot(commands.Bot):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
async def start(self, *args, **kwargs):
self.session = aiohttp.ClientSession()
#doesn't intefer with the main bot's session as the bot uses http_session
await super().start(*args, **kwargs)
async def close(self):
await self.session.close()
await super().close()
bot = MyBot()
You should be using bot, as it's commands.Bot and client doesn't have built in error handling, it's easier to tell which is which which is why people in the guild do it like this, just replace commands.Bot with your bot name, my bot uses JDBot I believe, Yep it does.
Don't copy my code word for word, make it your own unique code, let me see your changes, I may enjoy your yours, if you want you can even make an issue in my github about something you want changed(not removal of commands), unless it infrigres the actual rights of you.
(it likely won't)
Anyway, if you want to help me with commands, you can pull request them, and If you want to you can help me write or suggest new commands.
Anything related to Database could be asked to me, or someone could anylaze my code, if you have trouble reading my code.
pip install black, then run
```black .``` on the top folder.
I code weirdly, I am not a fan of pep8.
If you don't have a api key for the Cog DSLCount, you can always not include this until you get one.
topgg_key is the key for this, a disforge_key is required for the os.environ of that value.
botlist_eu_key is required for the bolist_eu to appear, again if you don't have these remove the variables or ask me to fork it and provide you the forked copy.
For the reddit api you need the reddit_client_id , reddit_client_secret, reddit_password, reddit_username
you also need the tweet_key, tweet_secret, tweet_access, tweet_token
I would rather not find all the stuff, just ask the library I use(which isn't hard to find out, how to get this info, or contact me when I am avaible)
classic_token is bot token, where you can get it from discord's portal.
clever_bot is from the travapi.
webhook1 and webhook99 are my own webhooks, they are meant for updating.
Paginator was made by Soheab_#6240!
Yes I got permission to use it.
For Legal Reasons, pycord if you have any issue with my paginator contact Soheab, he's the one who made the paginator.
Anyway, the github_token was from the personal token, page, you can go there if you want(make sure to use your **own** new account meant for your bot.
I only gave mine gist permissions, that's it.
For more information ask me on discord:
JDJG Inc. Official#3493
id: 168422909482762240
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment