<commit_before>import discord
from discord.ext import commands
import asyncio
import re
import sys
import os, random


#scriptpath = "../modules/commandmodule.py" #relative path dont DO a n y  Funny business
#sys.path.append(os.path.abspath(scriptpath))

description = '''A star bot.'''
bot = commands.Bot(command_prefix='!', description=description)
@bot.event
async def on_ready():
	print('Logged in as')
	print(bot.user.name, bot.user.id)
	print('Servers: ', end='')
	for server in bot.servers:
		print(str('{0}, ').format(server), end='')
	print()
	print('----------------')
	#global starnumber
	#starnumber = 4
	isrunning = False
	
#fn = os.path.join(os.path.dirname(__file__), 'starbot.py')
#dir = os.path.dirnam(__file__)


#owner 
owner = "141695444995670017"

#channels
#best_of = 332172659863453697
#bot-bot = 332229780797652992

#roles
#shut up = 329705402021183488

def getRandomFile(path):
  """
  Returns a random filename, chosen among the files of the given path.
  """
  files = os.listdir(path)
  index = random.randrange(0, len(files))
  return files[index]

'''starboard code'''

#@<EMAIL>
#async def on_member_join(member):
#	if member.id == ("289588477492723712"):
#		muterole = discord.utils.get(message.server.roles, id='329705402021183488')
#		await bot.add_roles(member, muterole)
	
@bot.event
async def on_reaction_add(reaction, member):
	print ("detected")
	if reaction.emoji == ("⭐"):
		if reaction.count == 5:
			nsfw = bot.get_channel("nsfw-garbage-bin")
			if reaction.message.channel != nsfw:	
				best_of = discord.utils.get(reaction.message.server.channels, name= "best_of")
				
			#embed message itself
				em = discord.Embed(title='Starred post', description=reaction.message.content, colour=0xFFD700)
				em.set_author(name=reaction.message.author, icon_url=reaction.message.author.avatar_url)
				<commit_msg>docstrings are only for functions<commit_after>import discord
from discord.ext import commands
import asyncio
import re
import sys
import os, random


#scriptpath = "../modules/commandmodule.py" #relative path dont DO a n y  Funny business
#sys.path.append(os.path.abspath(scriptpath))

description = '''A star bot.'''
bot = commands.Bot(command_prefix='!', description=description)
@bot.event
async def on_ready():
	print('Logged in as')
	print(bot.user.name, bot.user.id)
	print('Servers: ', end='')
	for server in bot.servers:
		print(str('{0}, ').format(server), end='')
	print()
	print('----------------')
	#global starnumber
	#starnumber = 4
	isrunning = False
	
#fn = os.path.join(os.path.dirname(__file__), 'starbot.py')
#dir = os.path.dirnam(__file__)


#owner 
owner = "141695444995670017"

#channels
#best_of = 332172659863453697
#bot-bot = 332229780797652992

#roles
#shut up = 329705402021183488

def getRandomFile(path):
  """
  Returns a random filename, chosen among the files of the given path.
  """
  files = os.listdir(path)
  index = random.randrange(0, len(files))
  return files[index]

###starboard code### 

#<EMAIL>
#async def on_member_join(member):
#	if member.id == ("289588477492723712"):
#		muterole = discord.utils.get(message.server.roles, id='329705402021183488')
#		await bot.add_roles(member, muterole)
	
@bot.event
async def on_reaction_add(reaction, member):
	print ("detected")
	if reaction.emoji == ("⭐"):
		if reaction.count == 5:
			nsfw = bot.get_channel("nsfw-garbage-bin")
			if reaction.message.channel != nsfw:	
				best_of = discord.utils.get(reaction.message.server.channels, name= "best_of")
				
			#embed message itself
				em = discord.Embed(title='Starred post', description=reaction.message.content, colour=0xFFD700)
				em.set_author(name=reaction.message.author, icon_url=reaction.message.author.avatar_url)
				
{'fraction_non_alphanumeric': 0.15088757396449703, 'fraction_numerical': 0.062399139322216246, 'mean_word_length': 4.7215384615384615, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3564162', 'n_tokens_mistral': 1524, 'n_tokens_neox': 1315, 'n_words': 294}