The below article will cover the intricacies of setting up databases and heroku in respect to a flask app. This is more like a memo and will have out of sequence instructions or solutions to errors so read thoroughly.
You'll need the packages
youtube_dl.utils.bug_reports_message = lambda: '' | |
ytdl_format_options = { | |
'format': 'bestaudio/best', | |
'restrictfilenames': True, | |
'noplaylist': True, | |
'nocheckcertificate': True, | |
'ignoreerrors': False, | |
'logtostderr': False, | |
'quiet': True, |
load_dotenv() | |
# Get the API token from the .env file. | |
DISCORD_TOKEN = os.getenv("discord_token") | |
intents = discord.Intents().all() | |
client = discord.Client(intents=intents) | |
bot = commands.Bot(command_prefix='!',intents=intents) |
import discord | |
from discord.ext import commands,tasks | |
import os | |
from dotenv import load_dotenv | |
import youtube_dl |
discord_token = "copy_paste_your_bot_token_here" |
string fun1(string s,int k){ | |
if(k>1){ | |
sort(s.begin(),s.end()); | |
return s; | |
} | |
string res=s; | |
for(int i=0;i<s.length();i++){ | |
char ch=s[0]; | |
s.erase(s.begin(),s.begin()+1); | |
s+=ch; |
string fun1(string s,int k){ | |
if(k>1){ | |
sort(s.begin(),s.end()); | |
return s; | |
} | |
string res=s; | |
for(int i=0;i<s.length();i++){ | |
char ch=s[0]; | |
s.erase(s.begin(),s.begin()+1); | |
s+=ch; |
The below article will cover the intricacies of setting up databases and heroku in respect to a flask app. This is more like a memo and will have out of sequence instructions or solutions to errors so read thoroughly.
You'll need the packages