import discord
import wikipedia
from discord.ext import commands

class Wiki:
	def __init__(self, bot):
		self.bot = bot

	@commands.group(invoke_without_command=True)
	async def wiki(self, ctx, *, query: str):
		await ctx.message.delete()
		await ctx.send(wikipedia.page(wikipedia.search(query)[0]).url)
	@wiki.command()
	async def search(self, ctx, *, query: str):
		await ctx.message.delete()
		resultlst = wikipedia.search(query)
		msg = "```py\n"
		for number, option in enumerate(resultlst[4:]):
			msg += "{0***REMOVED***. {1***REMOVED***\n".format(number+1, option)
		msg += "\n\nType 'exit' to leave the menu\n```"
		menumsg = await ctx.send(msg)
		def check(m):
		    return m.author == ctx.message.author and m.channel == ctx.message.channel and m.content.isdigit()
        response = await self.bot.wait_for('message',check=check)
        try:
        	if response.content.lower() == 'exit':
        		await response.delete()
        		await menumsg.delete()
        		return
        	else:
        		await response.delete()
        		await menumsg.delete()
        		item = resultlst[int(response.content)-1]
        except IndexError:
        	return
        await ctx.send(wikipedia.page(item).url)
def setup(bot):
	bot.add_cog(Coding(bot))
@@ -667,20 +667,17 @@
 k(m):%0A%09%09
-    
+%09
 return m
@@ -767,24 +767,18 @@
 digit()%0A
-        
+%09%09
 response
@@ -831,29 +831,17 @@
 ck)%0A
-        try:%0A        
+%09%09try:%0A%09%09
 %09if 
@@ -876,24 +876,18 @@
 'exit':%0A
-        
+%09%09
 %09%09await 
@@ -900,34 +900,28 @@
 se.delete()%0A
-        
+%09
 %09%09
+%09
 await menums
@@ -931,24 +931,18 @@
 elete()%0A
-        
+%09%09
 %09%09return
@@ -946,31 +946,19 @@
 urn%0A
-        %09else:%0A        
+%09%09%09else:%0A%09%09
 %09%09aw
@@ -979,24 +979,18 @@
 elete()%0A
-        
+%09%09
 %09%09await 
@@ -1006,24 +1006,18 @@
 elete()%0A
-        
+%09%09
 %09%09item =
@@ -1052,24 +1052,18 @@
 ent)-1%5D%0A
-        
+%09%09
 except I
@@ -1077,32 +1077,20 @@
 or:%0A
-        %09return%0A        
+%09%09%09return%0A%09%09
 awai
@@ -1159,14 +1159,12 @@
 cog(
-Coding
+Wiki
 (bot

Edit on Class