Skip to content

Commit 260d5a9

Browse files
Refine contributing examples
Agent-Logs-Url: https://github.com/CSSUoB/TeX-Bot-Py-V2/sessions/9b0f58a5-8242-47a5-9226-548cda2938f0 Co-authored-by: MattyTheHacker <18513864+MattyTheHacker@users.noreply.github.com>
1 parent 1a016a3 commit 260d5a9

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

CONTRIBUTING.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,9 @@ To create a new cog, follow these steps:
231231
class ExampleCog(TeXBotBaseCog):
232232
"""A cog for demonstrating functionality."""
233233

234-
def do_something(self, arguments: str) -> None:
234+
def do_something(self, input_text: str) -> None:
235235
"""Perform a simple action."""
236-
print(f"Doing something with {arguments}.")
236+
print(f"Doing something with {input_text}.")
237237
```
238238

239239
3. Add Commands and Listeners
@@ -553,7 +553,9 @@ To create and interact with Django models, follow these steps:
553553
if search_term is None:
554554
await ctx.respond("Provide a search term to filter records.", ephemeral=True)
555555
return
556-
records = await ExampleRecord.objects.filter(name__icontains=search_term)
556+
records = [
557+
record async for record in ExampleRecord.objects.filter(name__icontains=search_term)
558+
]
557559
names = ", ".join(record.name for record in records)
558560
await ctx.respond(f"Matching records: {names or 'None found.'}")
559561
return

0 commit comments

Comments
 (0)