Repository: Cog-Creators/Red-DiscordBot

Issue:
[V3 Admin] [p]announce still relies on default channel
Please be sure to read through other issues as well to make sure what you are suggesting/reporting has not already
been suggested/reported

### Type:

- [ ] Suggestion
- [x] Bug

### Brief description of the problem
if i using announce command it has happening this problem.
### Expected behavior
i thought i'd see an announcement on the channel on which the bot was invited.
### Actual behavior
The error log was output with the message(The announcement has begun.).
however, the announce was not seen anywhere...
### Steps to reproduce

1. V3 redbot installed.
2. [p]load admin
3. [p]announce
4. happening

error log
```
Task exception was never retrieved
future: <Task finished coro=<Announcer.announcer() done, defined at c:\users\endms\appdata\local\programs\python\python35\lib\site-packages\redbot\cogs\admin\announcer.py:50> exception=AttributeError("'Guild' object has no attribute 'default_channel'",)>
Traceback (most recent call last):
  File "c:\users\endms\appdata\local\programs\python\python35\lib\asyncio\tasks.py", line 239, in _step
    result = coro.send(None)
  File "c:\users\endms\appdata\local\programs\python\python35\lib\site-packages\redbot\cogs\admin\announcer.py", line 60, in announcer
    channel = await self._get_announce_channel(g)
  File "c:\users\endms\appdata\local\programs\python\python35\lib\site-packages\redbot\cogs\admin\announcer.py", line 46, in _get_announce_channel
    channel = guild.default_channel
AttributeError: 'Guild' object has no attribute 'default_channel'
Task exception was never retrieved
future: <Task finished coro=<Announcer.announcer() done, defined at c:\users\endms\appdata\local\programs\python\python35\lib\site-packages\redbot\cogs\admin\announcer.py:50> exception=AttributeError("'Guild' object has no attribute 'default_channel'",)>
Traceback (most recent call last):
  File "c:\users\endms\appdata\local\programs\python\python35\lib\asyncio\tasks.py", line 239, in _step
    result = coro.send(None)
  File "c:\users\endms\appdata\local\programs\python\python35\lib\site-packages\redbot\cogs\admin\announcer.py", line 60, in announcer
    channel = await self._get_announce_channel(g)
  File "c:\users\endms\appdata\local\programs\python\python35\lib\site-packages\redbot\cogs\admin\announcer.py", line 46, in _get_announce_channel
    channel = guild.default_channel
AttributeError: 'Guild' object has no attribute 'default_channel'
 ```


Discussion:

Resolving patch:
diff --git a/redbot/cogs/admin/admin.py b/redbot/cogs/admin/admin.py
--- a/redbot/cogs/admin/admin.py
+++ b/redbot/cogs/admin/admin.py
@@ -265,7 +265,7 @@ async def announce_channel(self, ctx, channel: discord.TextChannel=None):
         """
         if channel is None:
             channel = ctx.channel
-        await self.conf.guild(ctx.guild).set("announce_channel", channel.id)
+        await self.conf.guild(ctx.guild).announce_channel.set(channel.id)
 
         await ctx.send("The announcement channel has been set to {}".format(
             channel.mention
diff --git a/redbot/cogs/admin/announcer.py b/redbot/cogs/admin/announcer.py
--- a/redbot/cogs/admin/announcer.py
+++ b/redbot/cogs/admin/announcer.py
@@ -43,7 +43,10 @@ async def _get_announce_channel(self, guild: discord.Guild) -> discord.TextChann
             channel = guild.get_channel(channel_id)
 
         if channel is None:
-            channel = guild.default_channel
+            channel = guild.system_channel
+
+        if channel is None:
+            channel = guild.text_channels[0]
 
         return channel
 


Test patch: