mirror of
				https://github.com/NohamR/TransmissionBot.git
				synced 2025-10-31 14:19:30 +00:00 
			
		
		
		
	tmp
This commit is contained in:
		
							parent
							
								
									ab5ac15006
								
							
						
					
					
						commit
						d93b308a23
					
				
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | config.json | ||||||
							
								
								
									
										9
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,9 @@ | |||||||
|  | FROM python:3.10-alpine | ||||||
|  | 
 | ||||||
|  | COPY bot.py . | ||||||
|  | COPY requirements.txt . | ||||||
|  | COPY config.json . | ||||||
|  | 
 | ||||||
|  | RUN pip install --no-cache-dir -r requirements.txt | ||||||
|  | 
 | ||||||
|  | CMD ["python", "-u", "bot.py"] | ||||||
							
								
								
									
										14
									
								
								bot.py
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								bot.py
									
									
									
									
									
								
							| @ -227,7 +227,12 @@ TORRENT_OPTOUT_USERS = {} | |||||||
| async def determine_prefix(bot, message): | async def determine_prefix(bot, message): | ||||||
| 	return CONFIG['bot_prefix'] | 	return CONFIG['bot_prefix'] | ||||||
| 
 | 
 | ||||||
| client = Bot(command_prefix=determine_prefix) | # client = Bot(command_prefix=determine_prefix) | ||||||
|  | 
 | ||||||
|  | intents = discord.Intents.all()  | ||||||
|  | intents.members = False  | ||||||
|  | client = commands.Bot(command_prefix=determine_prefix, intents=intents) | ||||||
|  | 
 | ||||||
| TSCLIENT = None | TSCLIENT = None | ||||||
| MAKE_CLIENT_FAILED = False | MAKE_CLIENT_FAILED = False | ||||||
| 
 | 
 | ||||||
| @ -1120,7 +1125,12 @@ async def CommandPrecheck(message, whitelist=CONFIG['whitelist_user_ids']): | |||||||
| 		await asyncio.sleep(2) | 		await asyncio.sleep(2) | ||||||
| 		await message.delete() | 		await message.delete() | ||||||
| 		return False | 		return False | ||||||
| 	if message.author.id in CONFIG['blacklist_user_ids'] or (len(whitelist) > 0 and message.author.id not in whitelist): | 	# if message.author.id in CONFIG['blacklist_user_ids'] or (len(whitelist) > 0 and message.author.id not in whitelist): | ||||||
|  | 	if message.author.id in CONFIG['blacklist_user_ids'] or (len(whitelist) > 0 and message.author.id in whitelist): | ||||||
|  | 		# print(message.author.id in CONFIG['blacklist_user_ids']) | ||||||
|  | 		# print(len(whitelist) > 0) | ||||||
|  | 		# print(message.author.id not in whitelist) | ||||||
|  | 		# print((len(whitelist) > 0 and message.author.id not in whitelist)) | ||||||
| 		await message.channel.send("You're not allowed to use this...") | 		await message.channel.send("You're not allowed to use this...") | ||||||
| 		await asyncio.sleep(2) | 		await asyncio.sleep(2) | ||||||
| 		await message.delete() | 		await message.delete() | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| { | { | ||||||
|     "DM_compact_output_user_ids": [], |     "DM_compact_output_user_ids": [], | ||||||
|     "blacklist_user_ids": [], |     "blacklist_user_ids": [0], | ||||||
|     "bot_prefix": "t/", |     "bot_prefix": "t/", | ||||||
|     "bot_token": "BOT-TOKEN", |     "bot_token": "BOT-TOKEN", | ||||||
|     "delete_command_message_private_torrent": true, |     "delete_command_message_private_torrent": true, | ||||||
|  | |||||||
							
								
								
									
										6
									
								
								requirements.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								requirements.txt
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | |||||||
|  | aiohttp==3.8.6 | ||||||
|  | discord.py==2.3.2 | ||||||
|  | netifaces==0.11.0 | ||||||
|  | pytz==2023.3.post1 | ||||||
|  | Requests==2.31.0 | ||||||
|  | transmissionrpc==0.11 | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 √(noham)²
						√(noham)²