Skip to content

Instantly share code, notes, and snippets.

View anshulxyz's full-sized avatar
🦀

Anshul Chauhan anshulxyz

🦀
View GitHub Profile
Privacy Policy for [Bot Name]
This Privacy Policy governs the collection, use, and sharing of personal information by [Bot Name], a Discord bot developed by [Developer Name]. By using [Bot Name], you agree to the terms of this Privacy Policy.
Information We Collect
We collect information that you provide to us through your use of the bot, such as your Discord user ID and username, server and channel information, and message content. We may also collect usage data, such as the frequency and duration of your use of the bot.
How We Use Your Information
TERMS OF SERVICE AGREEMENT
This Terms of Service Agreement (the "Agreement") is entered into between [Anshul Chauhan] ("Bot Owner") and the user ("User") of the [Bot Name] Discord bot (the "Bot").
By using the Bot, the User agrees to be bound by the terms of this Agreement. If the User does not agree to the terms of this Agreement, they should immediately discontinue use of the Bot.
1. Use of the Bot: The Bot Owner grants the User a non-exclusive, non-transferable, limited license to use the Bot for personal or non-commercial purposes.
2. Prohibited Use: The User may not use the Bot in any way that violates applicable laws, rules, or regulations or infringes upon the rights of any third party. The User may not use the Bot for any commercial purposes without the express written consent of the Bot Owner.
3. Limitation of Liability: The Bot Owner shall not be liable for any damages arising out of the use or inability to use the Bot, including but not limited to, damages for loss of profits, loss of data, or o
@anshulxyz
anshulxyz / settings.json
Created March 30, 2022 05:46
VSCode settings
{
"editor.minimap.enabled": false,
"workbench.iconTheme": "material-icon-theme",
"editor.suggestSelection": "first",
"editor.renderWhitespace": "trailing",
"editor.rulers": [
80,
120
],
"[css]": {
// python linting settings for vs code
{
"python.linting.enabled": true,
"python.linting.mypyEnabled": true,
"python.linting.pylintEnabled": true,
"python.linting.pylintUseMinimalCheckers": false,
"python.linting.flake8Enabled": true,
"python.linting.mypyArgs": [
"--ignore-missing-imports",
"--follow-imports=silent",
@anshulxyz
anshulxyz / http_cog.py
Last active September 9, 2020 04:16
Run HTTP server aiohttp inside of your discord bot to handle HTTP requests. Cog based example.
from aiohttp import web
import asyncio
import discord
from discord.ext import commands
class HTTPCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
local ret_status="%(?:%{$fg_bold[green]%}-:%{$fg_bold[red]%}-%s)"
#function git_prompt_info() {
# ref=$(git symbolic-ref HEAD 2> /dev/null) || return
# echo "$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX$(parse_git_dirty)"
#}
function get_pwd(){
git_root=$PWD
while [[ $git_root != / && ! -e $git_root/.git ]]; do
@anshulxyz
anshulxyz / rule.js
Last active May 7, 2022 15:48 — forked from vktr/rule.js
Add Stripe Customer Id to Auth0 user's metadata, and Auth0 id to Stripe Customer's metadata via custom rule
function (user, context, callback) {
user.app_metadata = user.app_metadata || {};
// Checking if the Auth0 User already has a stripe customer id with it's metadata
if ('stripe_customer_id' in user.app_metadata) {
console.log(user);
return callback(null, user, context);
}
var stripe = require('stripe')('sk_test_tyd8...');